CVE-2026-23390
Received Received - Intake
Buffer Overflow in Linux Kernel dma_map_sg Tracepoint

Publication date: 2026-03-25

Last updated on: 2026-04-24

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: tracing/dma: Cap dma_map_sg tracepoint arrays to prevent buffer overflow The dma_map_sg tracepoint can trigger a perf buffer overflow when tracing large scatter-gather lists. With devices like virtio-gpu creating large DRM buffers, nents can exceed 1000 entries, resulting in: phys_addrs: 1000 * 8 bytes = 8,000 bytes dma_addrs: 1000 * 8 bytes = 8,000 bytes lengths: 1000 * 4 bytes = 4,000 bytes Total: ~20,000 bytes This exceeds PERF_MAX_TRACE_SIZE (8192 bytes), causing: WARNING: CPU: 0 PID: 5497 at kernel/trace/trace_event_perf.c:405 perf buffer not large enough, wanted 24620, have 8192 Cap all three dynamic arrays at 128 entries using min() in the array size calculation. This ensures arrays are only as large as needed (up to the cap), avoiding unnecessary memory allocation for small operations while preventing overflow for large ones. The tracepoint now records the full nents/ents counts and a truncated flag so users can see when data has been capped. Changes in v2: - Use min(nents, DMA_TRACE_MAX_ENTRIES) for dynamic array sizing instead of fixed DMA_TRACE_MAX_ENTRIES allocation (feedback from Steven Rostedt) - This allocates only what's needed up to the cap, avoiding waste for small operations Reviwed-by: Sean Anderson <[email protected]>
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-25
Last Modified
2026-04-24
Generated
2026-05-07
AI Q&A
2026-03-25
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 11 associated CPEs
Vendor Product Version / Range
linux linux_kernel 6.12
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel 6.19
linux linux_kernel From 6.13 (inc) to 6.18.13 (exc)
linux linux_kernel From 6.12.1 (inc) to 6.12.74 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in the Linux kernel's tracing subsystem, specifically in the dma_map_sg tracepoint. When tracing large scatter-gather lists, such as those created by devices like virtio-gpu with large DRM buffers, the number of entries (nents) can exceed 1000. This causes the tracepoint to allocate arrays that exceed the maximum allowed perf buffer size (PERF_MAX_TRACE_SIZE of 8192 bytes), leading to a buffer overflow.

The overflow happens because the combined size of the phys_addrs, dma_addrs, and lengths arrays can reach around 20,000 bytes, which is much larger than the allowed buffer size. This results in warnings and potential instability.

The fix caps the size of these arrays at 128 entries using a minimum function, ensuring that the arrays do not exceed the buffer size limit. This prevents the buffer overflow by limiting memory allocation to a safe size while still recording useful trace data.


How can this vulnerability impact me? :

This vulnerability can cause a buffer overflow in the Linux kernel's tracing subsystem, which may lead to kernel warnings and potentially unstable behavior during performance tracing of devices with large scatter-gather lists.

While the description does not explicitly mention exploitation or direct security breaches, buffer overflows in kernel space can sometimes lead to crashes or denial of service conditions, impacting system reliability.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability involves a perf buffer overflow triggered by the dma_map_sg tracepoint when tracing large scatter-gather lists in the Linux kernel.

Detection can involve monitoring kernel logs for warnings related to perf buffer size, such as messages like: "WARNING: CPU: 0 PID: XXXX at kernel/trace/trace_event_perf.c:405 perf buffer not large enough".

You can check kernel logs using commands like:

  • dmesg | grep -i perf
  • journalctl -k | grep -i perf

Additionally, tracing tools that use the dma_map_sg tracepoint might show truncated data or errors when handling large scatter-gather lists.


What immediate steps should I take to mitigate this vulnerability?

The vulnerability has been resolved by capping the dma_map_sg tracepoint arrays to a maximum of 128 entries, preventing buffer overflow.

Immediate mitigation steps include:

  • Update the Linux kernel to a version that includes the fix for this vulnerability (post 2026-03-25).
  • Avoid tracing large scatter-gather lists with dma_map_sg tracepoints until the kernel is updated.
  • Monitor kernel logs for perf buffer overflow warnings to detect attempts to trigger the vulnerability.

Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart