CVE-2026-99164·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: spi: imx: fix slab corruption from undersized DMA bounce buffers Since commit faa8e404ad8e ("spi: imx: support dynamic burst length for ECSPI DMA mode"), the driver allocates its private DMA TX/RX buffers with kzalloc(dma_len), where dma_len is only rounded up to 4 bytes, but maps, syncs and unmaps them with DMA_CACHE_ALIGNED_LEN(dma_len), i.e. rounded up to the cache line size. As a result, the DMA API operates on memory beyond the end of the allocation. This was observed on a custom i.MX8MP platform with an mcp251xfd CAN controller under heavy RPMSG load, as a series of refcount_t warnings triggered from rpmsg_recv_done() in virtio_rpmsg_bus: refcount_t: addition on 0; use-after-free. refcount_t: underflow; use-after-free. refcount_t: saturated; leaking memory. Leading finally to an "Unable to handle kernel paging request" oops. Reproducing this problem took between 30 minutes and roughly 30 hours under the same workload. Hardware watchpoints on the refcount of a struct rpmsg_endpoint showed it was overwritten from 2 to 1 by __pi_memcpy_generic() in the irq/155-spi2.0 thread. Additionally it was found that a "normal" rpmsg_recv_done() took 11µs +/-2µs from its kref_get to kref_put. In the error case the same sequence took about 215µs +/-10µs. Based on this, an LLM was used to identify the size mismatch fixed here. Allocate the buffers with DMA_CACHE_ALIGNED_LEN(dma_len) so they cover the full mapped length, and use the same length for dma_sync_single_for_cpu() to stay consistent with map and unmap. With this patch applied, the same workload ran for more than 200 hours without the problem reproducing.
- Severity
- high
- Software
- Kernel
- Fixed in
- 7.2.13, 7.3
- Published
How to fix this CVE
Update your Linux kernel to version 7.2.13 (stable) or 7.3+ (mainline) to patch a critical memory corruption issue in the SPI driver's DMA buffer handling. Contact your Linux distribution vendor for an updated kernel package if you are running an older stable branch. This fix prevents slab corruption that can cause system instability and data corruption under heavy SPI load.
sudo dnf check-update kernel && sudo dnf update kernelDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with: uname -r
- Step 2: Verify if your kernel is older than 7.2.13 or 7.3 by comparing the version number output
- Step 3: Search system logs for refcount warnings and memory corruption errors: sudo journalctl -b | grep -i 'refcount_t\|use-after-free\|kernel paging request'
- Step 4: After patching, reboot and verify the new kernel version: uname -r; then confirm no refcount warnings appear in: dmesg | tail -20
FAQ
What is CVE-2026-99164?
This vulnerability is a memory corruption flaw in the Linux kernel's SPI (Serial Peripheral Interface) driver where DMA bounce buffers are allocated smaller than the memory region actually accessed by the DMA API, causing writes beyond allocated bounds that corrupt adjacent kernel memory and trigger use-after-free conditions.
Is CVE-2026-99164 being actively exploited?
No, there is no evidence of active exploitation or public exploits available for this vulnerability. However, it can be triggered under specific workload patterns involving heavy SPI communication.
What versions of Kernel are affected by CVE-2026-99164?
Kernel versions from the introduction of dynamic burst length for ECSPI DMA mode (after commit faa8e404ad8e) through 7.2.12 and earlier 7.x versions are affected. The fix is available in kernel 7.2.13 and 7.3+.
How do I check if my server is vulnerable to CVE-2026-99164?
Run: uname -r | awk -F. '{if ($1 < 7 || ($1 == 7 && $2 < 2) || ($1 == 7 && $2 == 2 && $3 < 13)) print "VULNERABLE"; else print "PATCHED"}'
Does Defensia detect CVE-2026-99164?
Yes — Defensia's CVE advisory scanner compares installed kernel package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2026-99164 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-99164. Free for 1 server.
Get started free