CVE-2026-23390

Source
https://cve.org/CVERecord?id=CVE-2026-23390
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23390.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-23390
Downstream
Published
2026-03-25T10:29:02.768Z
Modified
2026-04-02T13:12:23.811946Z
Summary
tracing/dma: Cap dma_map_sg tracepoint arrays to prevent buffer overflow
Details

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

tracing/dma: Cap dmamapsg tracepoint arrays to prevent buffer overflow

The dmamapsg 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:

physaddrs: 1000 * 8 bytes = 8,000 bytes dmaaddrs: 1000 * 8 bytes = 8,000 bytes lengths: 1000 * 4 bytes = 4,000 bytes Total: ~20,000 bytes

This exceeds PERFMAXTRACE_SIZE (8192 bytes), causing:

WARNING: CPU: 0 PID: 5497 at kernel/trace/traceeventperf.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, DMATRACEMAXENTRIES) for dynamic array sizing instead of fixed DMATRACEMAXENTRIES 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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23390.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
038eb433dc1474c4bc7d33188294e3d4778efdfd
Fixed
02d209bb018a40dee9eac89e91860253dee9605b
Fixed
f2584f791a10343bdc995ff6ff402db45b95de69
Fixed
daafcc0ef0b358d9d622b6e3b7c43767aa3814ee

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23390.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.12.0
Fixed
6.12.74
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.13

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23390.json"