# CVE-2024-38601: ring-buffer: Fix a race between readers and resize checks

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2024-06-19T13:48:13.097Z
- **Modified:** 2026-06-17T07:40:41.260Z

## Who should check

- Anyone running Linux \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< b50932ea673b5a089a4bb570a8a868d95c72854e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c68b7a442ee61d04ca58b2b5cb5ea7cb8230f84a; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 1e160196042cac946798ac192a0bc3398f1aa66b; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 595363182f28786d641666a09e674b852c83b4bb; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 54c64967ba5f8658ae7da76005024ebd3d9d8f6e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< af3274905b3143ea23142bbf77bd9b610c54e533; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 79b52013429a42b8efdb0cda8bb0041386abab87; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c2274b908db05529980ec056359fae916939fdaa
- Anyone running Linux 3.5

## Description

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

ring-buffer: Fix a race between readers and resize checks

The reader code in rb\_get\_reader\_page() swaps a new reader page into the
ring buffer by doing cmpxchg on old-\>list.prev-\>next to point it to the
new page. Following that, if the operation is successful,
old-\>list.next-\>prev gets updated too. This means the underlying
doubly-linked list is temporarily inconsistent, page-\>prev-\>next or
page-\>next-\>prev might not be equal back to page for some page in the
ring buffer.

The resize operation in ring\_buffer\_resize() can be invoked in parallel.
It calls rb\_check\_pages() which can detect the described inconsistency
and stop further tracing:

\[  190.271762\] ------------\[ cut here \]------------
\[  190.271771\] WARNING: CPU: 1 PID: 6186 at kernel/trace/ring\_buffer.c:1467 rb\_check\_pages.isra.0+0x6a/0xa0
\[  190.271789\] Modules linked in: \[...\]
\[  190.271991\] Unloaded tainted modules: intel\_uncore\_frequency(E):1 skx\_edac(E):1
\[  190.272002\] CPU: 1 PID: 6186 Comm: cmd.sh Kdump: loaded Tainted: G            E      6.9.0-rc6-default \#5 158d3e1e6d0b091c34c3b96bfd99a1c58306d79f
\[  190.272011\] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552c-rebuilt.opensuse.org 04/01/2014
\[  190.272015\] RIP: 0010:rb\_check\_pages.isra.0+0x6a/0xa0
\[  190.272023\] Code: \[...\]
\[  190.272028\] RSP: 0018:ffff9c37463abb70 EFLAGS: 00010206
\[  190.272034\] RAX: ffff8eba04b6cb80 RBX: 0000000000000007 RCX: ffff8eba01f13d80
\[  190.272038\] RDX: ffff8eba01f130c0 RSI: ffff8eba04b6cd00 RDI: ffff8eba0004c700
\[  190.272042\] RBP: ffff8eba0004c700 R08: 0000000000010002 R09: 0000000000000000
\[  190.272045\] R10: 00000000ffff7f52 R11: ffff8eba7f600000 R12: ffff8eba0004c720
\[  190.272049\] R13: ffff8eba00223a00 R14: 0000000000000008 R15: ffff8eba067a8000
\[  190.272053\] FS:  00007f1bd64752c0(0000) GS:ffff8eba7f680000(0000) knlGS:0000000000000000
\[  190.272057\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  190.272061\] CR2: 00007f1bd6662590 CR3: 000000010291e001 CR4: 0000000000370ef0
\[  190.272070\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[  190.272073\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[  190.272077\] Call Trace:
\[  190.272098\]  \<TASK\>
\[  190.272189\]  ring\_buffer\_resize+0x2ab/0x460
\[  190.272199\]  \_\_tracing\_resize\_ring\_buffer.part.0+0x23/0xa0
\[  190.272206\]  tracing\_resize\_ring\_buffer+0x65/0x90
\[  190.272216\]  tracing\_entries\_write+0x74/0xc0
\[  190.272225\]  vfs\_write+0xf5/0x420
\[  190.272248\]  ksys\_write+0x67/0xe0
\[  190.272256\]  do\_syscall\_64+0x82/0x170
\[  190.272363\]  entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
\[  190.272373\] RIP: 0033:0x7f1bd657d263
\[  190.272381\] Code: \[...\]
\[  190.272385\] RSP: 002b:00007ffe72b643f8 EFLAGS: 00000246 ORIG\_RAX: 0000000000000001
\[  190.272391\] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1bd657d263
\[  190.272395\] RDX: 0000000000000002 RSI: 0000555a6eb538e0 RDI: 0000000000000001
\[  190.272398\] RBP: 0000555a6eb538e0 R08: 000000000000000a R09: 0000000000000000
\[  190.272401\] R10: 0000555a6eb55190 R11: 0000000000000246 R12: 00007f1bd6662500
\[  190.272404\] R13: 0000000000000002 R14: 00007f1bd6667c00 R15: 0000000000000002
\[  190.272412\]  \</TASK\>
\[  190.272414\] ---\[ end trace 0000000000000000 \]---

Note that ring\_buffer\_resize() calls rb\_check\_pages() only if the parent
trace\_buffer has recording disabled. Recent commit d78ab792705c
("tracing: Stop current tracer when resizing buffer") causes that it is
now always the case which makes it more likely to experience this issue.

The window to hit this race is nonetheless very small. To help
reproducing it, one can add a delay loop in rb\_get\_reader\_page():

 ret = rb\_head\_page\_replace(reader, cpu\_buffer-\>reader\_page);
 if (!ret)
 	goto spin;
 for (unsigned i = 0; i \< 1U \<\< 26; i++)  /\* inserted delay loop \*/
 	\_\_asm\_\_ \_\_volatile\_\_ ("" : : : "memory");
 rb\_list\_head(reader-\>list.next)-\>prev = &cpu\_buffer-\>reader\_page-\>list;

.. 
---truncated---

## Affected and fixed versions

- Linux: \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< b50932ea673b5a089a4bb570a8a868d95c72854e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c68b7a442ee61d04ca58b2b5cb5ea7cb8230f84a; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 1e160196042cac946798ac192a0bc3398f1aa66b; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 595363182f28786d641666a09e674b852c83b4bb; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 54c64967ba5f8658ae7da76005024ebd3d9d8f6e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< af3274905b3143ea23142bbf77bd9b610c54e533; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 79b52013429a42b8efdb0cda8bb0041386abab87; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c2274b908db05529980ec056359fae916939fdaa (cvelist)
- Linux: 3.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-38601. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-38601.md
Affected: Linux >= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, < b50932ea673b5a089a4bb570a8a868d95c72854e; >= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, < c68b7a442ee61d04ca58b2b5cb5ea7cb8230f84a; >= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, < 1e160196042cac946798ac192a0bc3398f1aa66b; >= 659f451ff21315ebfeeb46b…
Fixed in: Linux 1e160196042cac946798ac192a0bc3398f1aa66b, Linux 595363182f28786d641666a09e674b852c83b4bb, Linux 54c64967ba5f8658ae7da76005024ebd3d9d8f6e, Linux 5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1, Linux 79b52013429a42b8efdb0cda8bb0041386abab87

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-38601 being exploited?

There is no confirmed exploitation: CVE-2024-38601 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-38601?

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2024-38601?

Linux \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< b50932ea673b5a089a4bb570a8a868d95c72854e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c68b7a442ee61d04ca58b2b5cb5ea7cb8230f84a; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 1e160196042cac946798ac192a0bc3398f1aa66b; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 595363182f28786d641666a09e674b852c83b4bb; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 54c64967ba5f8658ae7da76005024ebd3d9d8f6e; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< af3274905b3143ea23142bbf77bd9b610c54e533; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< 79b52013429a42b8efdb0cda8bb0041386abab87; \>= 659f451ff21315ebfeeb46b9adccee8ce1b52c25, \< c2274b908db05529980ec056359fae916939fdaa; Linux 3.5.

### Is there a fix for CVE-2024-38601?

Yes. Fixed in Linux 1e160196042cac946798ac192a0bc3398f1aa66b, Linux 595363182f28786d641666a09e674b852c83b4bb, Linux 54c64967ba5f8658ae7da76005024ebd3d9d8f6e, Linux 5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1, Linux 79b52013429a42b8efdb0cda8bb0041386abab87. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-38601?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b50932ea673b5a089a4bb570a8a868d95c72854e>
- patch: <https://git.kernel.org/stable/c/c68b7a442ee61d04ca58b2b5cb5ea7cb8230f84a>
- patch: <https://git.kernel.org/stable/c/1e160196042cac946798ac192a0bc3398f1aa66b>
- patch: <https://git.kernel.org/stable/c/595363182f28786d641666a09e674b852c83b4bb>
- patch: <https://git.kernel.org/stable/c/54c64967ba5f8658ae7da76005024ebd3d9d8f6e>
- patch: <https://git.kernel.org/stable/c/af3274905b3143ea23142bbf77bd9b610c54e533>
- patch: <https://git.kernel.org/stable/c/5ef9e330406d3fb4f4b2c8bca2c6b8a93bae32d1>
- patch: <https://git.kernel.org/stable/c/79b52013429a42b8efdb0cda8bb0041386abab87>
- patch: <https://git.kernel.org/stable/c/c2274b908db05529980ec056359fae916939fdaa>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-38601>

HTML: <https://flawdb.com/CVE-2024-38601> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-38601>
