4.7medium
fgraph: Add READ_ONCE() when accessing fgraph_array[]
- Severity
- 4.7medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.17% (higher than 6% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
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[]").
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 37238abe3cb47b8daaa8706c9949f67b2a705cf1 before b68b2a3fbacc7be720ef589d489bcacdd05c6d38, from 37238abe3cb47b8daaa8706c9949f67b2a705cf1 before d65474033740ded0a4fe9a097fce72328655b41d, 6.11 Not affected: before 6.11, from 6.12.9 up to 6.12.*, from 6.13 up to * | CVE List |
| linux linux_kernel | from 6.11 before 6.12.9, 6.13 | NVD |
All scores
| CISA-ADP | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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[]").
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: fgraph: Agregar READ_ONCE() al acceder a fgraph_array[] En __ftrace_return_to_handler(), un bucle itera sobre los elementos fgraph_array[], que son fgraph_ops. El bucle comprueba si un elemento es un fgraph_stub para evitar usar un fgraph_stub después. Sin embargo, si el compilador vuelve a cargar fgraph_array[] después de esta comprobación, podría competir con una actualización a fgraph_array[] que introduce un fgraph_stub. Esto podría dar como resultado que se procese el stub, pero que este contenga un campo "func_hash" nulo, lo que lleva a una desreferencia de puntero NULL. Para garantizar que los gops comparados con fgraph_stub coincidan con los gops procesados ??más tarde, agregue un READ_ONCE(). Un parche similar aparece en el commit 63a8dfb ("function_graph: Agregar READ_ONCE() al acceder a fgraph_array[]").
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-57934 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-57934 changed 2026-06-17 | Public domain |