Skip to content
Heist/ feed
Back to feed
MediumFix available

fgraph: Add READ_ONCE() when accessing fgraph_array[]

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: fgraph: Add READ_ONCE() when accessing fgraph_array[] In __ftrace_return_to_handler(), a loop iterates over the fgraph_array[] elements, which are fgraph_ops. The loop checks if an element is a fgraph_stub to prevent using a fgraph_stub afterward. However, if the compiler reloads fgraph_array[] after this check, it might race with an update to fgraph_array[] that introduces a fgraph_stub. This could result in the stub being processed, but the stub contains a null "func_hash" field, leading to a NULL pointer dereference. To ensure that the gops compared against the fgraph_stub matches the gops processed later, add a READ_ONCE(). A similar patch appears in commit 63a8dfb ("function_graph: Add READ_ONCE() when accessing fgraph_array[]").

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.9
CVEs
CVE-2024-57934
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 07:00 UTC · Revision 1

Source evidence

fgraph: Add READ_ONCE() when accessing fgraph_array[]

core-osv · Original source

Published 21 Jan 2025, 12:01 UTC

In the Linux kernel, the following vulnerability has been resolved: fgraph: Add READ_ONCE() when accessing fgraph_array[] In __ftrace_return_to_handler(), a loop iterates over the fgraph_array[] elements, which are fgraph_ops. The loop checks if an element is a fgraph_stub to prevent using a fgraph_stub afterward. However, if the compiler reloads fgraph_array[] after this check, it might race with an update to fgraph_array[] that introduces a fgraph_stub. This could result in the stub being processed, but the stub contains a null "func_hash" field, leading to a NULL pointer dereference. To ensure that the gops compared against the fgraph_stub matches the gops processed later, add a READ_ONCE(). A similar patch appears in commit 63a8dfb ("function_graph: Add READ_ONCE() when accessing fgraph_array[]").

osv:CVE-2024-57934

Kernel

Fixed versions: 6.12.9

Complete source record
{
  "id": "03c50ec5cfab310e660e85b811912d4c20d965a866bb44245dbfea271d3fc05b",
  "url": "https://osv.dev/vulnerability/CVE-2024-57934",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "fgraph: Add READ_ONCE() when accessing fgraph_array[]",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: fgraph: Add READ_ONCE() when accessing fgraph_array[] In __ftrace_return_to_handler(), a loop iterates over the fgraph_array[] elements, which are fgraph_ops. The loop checks if an element is a fgraph_stub to prevent using a fgraph_stub afterward. However, if the compiler reloads fgraph_array[] after this check, it might race with an update to fgraph_array[] that introduces a fgraph_stub. This could result in the stub being processed, but the stub contains a null \"func_hash\" field, leading to a NULL pointer dereference. To ensure that the gops compared against the fgraph_stub matches the gops processed later, add a READ_ONCE(). A similar patch appears in commit 63a8dfb (\"function_graph: Add READ_ONCE() when accessing fgraph_array[]\").",
    "evidence": "osv:CVE-2024-57934",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-57934",
      "aliases": [
        "CVE-2024-57934"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "37238abe3cb47b8daaa8706c9949f67b2a705cf1"
                },
                {
                  "fixed": "b68b2a3fbacc7be720ef589d489bcacdd05c6d38"
                },
                {
                  "fixed": "d65474033740ded0a4fe9a097fce72328655b41d"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57934.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.11.0"
                },
                {
                  "fixed": "6.12.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57934.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:26.788061552Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/b68b2a3fbacc7be720ef589d489bcacdd05c6d38",
        "https://git.kernel.org/stable/c/d65474033740ded0a4fe9a097fce72328655b41d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57934.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-57934",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57934.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-57934",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493197,
  "published_at": "2025-01-21T12:01:30.537+00:00"
}