CVE-2026-23390

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 <sean.anderson@linux.dev>
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*

History

24 Apr 2026, 18:32

Type Values Removed Values Added
First Time Linux
Linux linux Kernel
CWE CWE-787
CPE cpe:2.3:o:linux:linux_kernel:6.19:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc8:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.19:rc7:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/02d209bb018a40dee9eac89e91860253dee9605b - () https://git.kernel.org/stable/c/02d209bb018a40dee9eac89e91860253dee9605b - Patch
References () https://git.kernel.org/stable/c/daafcc0ef0b358d9d622b6e3b7c43767aa3814ee - () https://git.kernel.org/stable/c/daafcc0ef0b358d9d622b6e3b7c43767aa3814ee - Patch
References () https://git.kernel.org/stable/c/f2584f791a10343bdc995ff6ff402db45b95de69 - () https://git.kernel.org/stable/c/f2584f791a10343bdc995ff6ff402db45b95de69 - Patch
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: tracing/dma: Limitar los arrays del tracepoint dma_map_sg para prevenir el desbordamiento de búfer El tracepoint dma_map_sg puede desencadenar un desbordamiento de búfer de perf al trazar listas grandes de scatter-gather. Con dispositivos como virtio-gpu creando búferes DRM grandes, nents puede exceder las 1000 entradas, resultando en: 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 Esto excede PERF_MAX_TRACE_SIZE (8192 bytes), causando: ADVERTENCIA: CPU: 0 PID: 5497 en kernel/trace/trace_event_perf.c:405 búfer de perf no lo suficientemente grande, se querían 24620, se tienen 8192 Limitar los tres arrays dinámicos a 128 entradas usando min() en el cálculo del tamaño del array. Esto asegura que los arrays sean solo tan grandes como sea necesario (hasta el límite), evitando la asignación de memoria innecesaria para operaciones pequeñas mientras se previene el desbordamiento para las grandes. El tracepoint ahora registra los conteos completos de nents/ents y un indicador de truncamiento para que los usuarios puedan ver cuándo los datos han sido limitados. Cambios en v2: - Usar min(nents, DMA_TRACE_MAX_ENTRIES) para el dimensionamiento dinámico del array en lugar de la asignación fija de DMA_TRACE_MAX_ENTRIES (comentarios de Steven Rostedt) - Esto asigna solo lo necesario hasta el límite, evitando el desperdicio para operaciones pequeñas Revisado por: Sean Anderson

25 Mar 2026, 11:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-03-25 11:16

Updated : 2026-04-24 18:32


NVD link : CVE-2026-23390

Mitre link : CVE-2026-23390

CVE.ORG link : CVE-2026-23390


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-787

Out-of-bounds Write