# CVE-2026-99164: spi: imx: fix slab corruption from undersized DMA bounce buffers

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 3, 2026-11-26)
- **Published:** 2026-10-28T10:35:16.694Z
- **Modified:** 2026-10-31T13:17:58.290Z

## Who should check

- Anyone running Linux \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 2777f6637da02da84c9c1ff92f413ce0f0995084; \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 59eb22641f0c526dd064390b11cff99ae87c2858
- Anyone running Linux 7.0

## Description

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.

## Affected and fixed versions

- Linux: \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 2777f6637da02da84c9c1ff92f413ce0f0995084; \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 59eb22641f0c526dd064390b11cff99ae87c2858 (cvelist)
- Linux: 7.0 (cvelist)

## Mitigation

- Upgrade Linux to 59eb22641f0c526dd064390b11cff99ae87c2858 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-99164. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-99164.md
Affected: Linux >= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, < 2777f6637da02da84c9c1ff92f413ce0f0995084; >= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, < 59eb22641f0c526dd064390b11cff99ae87c2858; Linux 7.0
Fixed in: Linux 2777f6637da02da84c9c1ff92f413ce0f0995084, Linux 59eb22641f0c526dd064390b11cff99ae87c2858

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-99164 being exploited?

There is no confirmed exploitation: CVE-2026-99164 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-99164?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-99164?

Linux \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 2777f6637da02da84c9c1ff92f413ce0f0995084; \>= faa8e404ad8e686cb98c51dc507fdcacfb8020ce, \< 59eb22641f0c526dd064390b11cff99ae87c2858; Linux 7.0.

### Is there a fix for CVE-2026-99164?

Yes. Fixed in Linux 2777f6637da02da84c9c1ff92f413ce0f0995084, Linux 59eb22641f0c526dd064390b11cff99ae87c2858. Upgrade Linux to 59eb22641f0c526dd064390b11cff99ae87c2858 or later.

### How do I check if I'm affected by CVE-2026-99164?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/2777f6637da02da84c9c1ff92f413ce0f0995084>
- other: <https://git.kernel.org/stable/c/59eb22641f0c526dd064390b11cff99ae87c2858>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-99164>

HTML: <https://flawdb.com/CVE-2026-99164> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-99164>
