# CVE-2024-56368: ring-buffer: Fix overflow in \_\_rb\_map\_vma

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; 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.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-190
- **Published:** 2025-01-11T12:35:45.719Z
- **Modified:** 2026-08-05T11:44:53.114Z

## Who should check

- Anyone running Linux \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< ec12f30fe54234dd40ffee50dda8d2df10bd0871; \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< c58a812c8e49ad688f94f4b050ad5c5b388fc5d2
- Anyone running Linux 6.10

## Description

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

ring-buffer: Fix overflow in \_\_rb\_map\_vma

An overflow occurred when performing the following calculation:

   nr\_pages = ((nr\_subbufs + 1) \<\< subbuf\_order) - pgoff;

Add a check before the calculation to avoid this problem.

syzbot reported this as a slab-out-of-bounds in \_\_rb\_map\_vma:

BUG: KASAN: slab-out-of-bounds in \_\_rb\_map\_vma+0x9ab/0xae0 kernel/trace/ring\_buffer.c:7058
Read of size 8 at addr ffff8880767dd2b8 by task syz-executor187/5836

CPU: 0 UID: 0 PID: 5836 Comm: syz-executor187 Not tainted 6.13.0-rc2-syzkaller-00159-gf932fb9b4074 \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
 dump\_stack\_lvl+0x116/0x1f0 lib/dump\_stack.c:120
 print\_address\_description mm/kasan/report.c:378 \[inline\]
 print\_report+0xc3/0x620 mm/kasan/report.c:489
 kasan\_report+0xd9/0x110 mm/kasan/report.c:602
 \_\_rb\_map\_vma+0x9ab/0xae0 kernel/trace/ring\_buffer.c:7058
 ring\_buffer\_map+0x56e/0x9b0 kernel/trace/ring\_buffer.c:7138
 tracing\_buffers\_mmap+0xa6/0x120 kernel/trace/trace.c:8482
 call\_mmap include/linux/fs.h:2183 \[inline\]
 mmap\_file mm/internal.h:124 \[inline\]
 \_\_mmap\_new\_file\_vma mm/vma.c:2291 \[inline\]
 \_\_mmap\_new\_vma mm/vma.c:2355 \[inline\]
 \_\_mmap\_region+0x1786/0x2670 mm/vma.c:2456
 mmap\_region+0x127/0x320 mm/mmap.c:1348
 do\_mmap+0xc00/0xfc0 mm/mmap.c:496
 vm\_mmap\_pgoff+0x1ba/0x360 mm/util.c:580
 ksys\_mmap\_pgoff+0x32c/0x5c0 mm/mmap.c:542
 \_\_do\_sys\_mmap arch/x86/kernel/sys\_x86\_64.c:89 \[inline\]
 \_\_se\_sys\_mmap arch/x86/kernel/sys\_x86\_64.c:82 \[inline\]
 \_\_x64\_sys\_mmap+0x125/0x190 arch/x86/kernel/sys\_x86\_64.c:82
 do\_syscall\_x64 arch/x86/entry/common.c:52 \[inline\]
 do\_syscall\_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

The reproducer for this bug is:

------------------------8\<-------------------------
 \#include \<fcntl.h\>
 \#include \<stdlib.h\>
 \#include \<unistd.h\>
 \#include \<asm/types.h\>
 \#include \<sys/mman.h\>

 int main(int argc, char \*\*argv)
 {
	int page\_size = getpagesize();
	int fd;
	void \*meta;

	system("echo 1 \> /sys/kernel/tracing/buffer\_size\_kb");
	fd = open("/sys/kernel/tracing/per\_cpu/cpu0/trace\_pipe\_raw", O\_RDONLY);

	meta = mmap(NULL, page\_size, PROT\_READ, MAP\_SHARED, fd, page\_size \* 5);
 }
------------------------\>8-------------------------

## Affected and fixed versions

- Linux: \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< ec12f30fe54234dd40ffee50dda8d2df10bd0871; \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< c58a812c8e49ad688f94f4b050ad5c5b388fc5d2 (cvelist)
- Linux: 6.10 (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-56368. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-56368.md
Affected: Linux >= 117c39200d9d760cbd5944bb89efb7b9c51965aa, < ec12f30fe54234dd40ffee50dda8d2df10bd0871; >= 117c39200d9d760cbd5944bb89efb7b9c51965aa, < c58a812c8e49ad688f94f4b050ad5c5b388fc5d2; Linux 6.10
Fixed in: no fixed version listed yet

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-56368 being exploited?

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

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

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< ec12f30fe54234dd40ffee50dda8d2df10bd0871; \>= 117c39200d9d760cbd5944bb89efb7b9c51965aa, \< c58a812c8e49ad688f94f4b050ad5c5b388fc5d2; Linux 6.10.

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

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

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

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/ec12f30fe54234dd40ffee50dda8d2df10bd0871>
- patch: <https://git.kernel.org/stable/c/c58a812c8e49ad688f94f4b050ad5c5b388fc5d2>

## 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-56368>

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