CVE-2024-57934

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57934
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57934.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-57934
Downstream
Related
Published
2025-01-21T12:01:30.537Z
Modified
2025-11-20T07:36:50.295312Z
Severity
  • 4.7 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
fgraph: Add READ_ONCE() when accessing fgraph_array[]
Details

In the Linux kernel, the following vulnerability has been resolved:

fgraph: Add READONCE() when accessing fgrapharray[]

In _ftracereturntohandler(), a loop iterates over the fgrapharray[] elements, which are fgraphops. The loop checks if an element is a fgraphstub to prevent using a fgraphstub afterward.

However, if the compiler reloads fgrapharray[] after this check, it might race with an update to fgrapharray[] that introduces a fgraphstub. This could result in the stub being processed, but the stub contains a null "funchash" field, leading to a NULL pointer dereference.

To ensure that the gops compared against the fgraphstub matches the gops processed later, add a READONCE(). A similar patch appears in commit 63a8dfb ("functiongraph: Add READONCE() when accessing fgraph_array[]").

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
37238abe3cb47b8daaa8706c9949f67b2a705cf1
Fixed
b68b2a3fbacc7be720ef589d489bcacdd05c6d38
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
37238abe3cb47b8daaa8706c9949f67b2a705cf1
Fixed
d65474033740ded0a4fe9a097fce72328655b41d

Affected versions

v6.*

v6.10
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.12.7
v6.12.8
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.11.0
Fixed
6.12.9