tracing: Fix WARN_ON in tracing_buffers_mmap_close for split VMAs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.616.17.116.18In the Linux kernel, the following vulnerability has been resolved:
tracing: Fix WARN_ON in tracing_buffers_mmap_close for split VMAs
When a VMA is split (e.g., by partial munmap or MAP_FIXED), the kernel calls vm_ops->close on each portion. For trace buffer mappings, this results in ring_buffer_unmap() being called multiple times while ring_buffer_map() was only called once.
This causes ring_buffer_unmap() to return -ENODEV on subsequent calls because user_mapped is already 0, triggering a WARN_ON.
Trace buffer mappings cannot support partial mappings because the ring buffer structure requires the complete buffer including the meta page.
Fix this by adding a may_split callback that returns -EINVAL to prevent VMA splits entirely.
From the CVE record · Linux
The Linux kernel's trace buffer mappings can trigger a WARN_ON when a mapped VMA is split, such as by partial munmap or MAP_FIXED. A local user who can create a trace buffer mapping and split it can trigger the warning; the input does not specify authentication requirements or any further impact.
Anyone running a Linux kernel with the affected trace buffer mapping behavior should check their version; affected versions are not specified.