{"schema":"threatline.record/2","record":{"id":"CVE-2026-99164","aliases":[],"summary":"spi: imx: fix slab corruption from undersized DMA bounce buffers","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: imx: fix slab corruption from undersized DMA bounce buffers\n\nSince commit faa8e404ad8e (\"spi: imx: support dynamic burst length for\nECSPI DMA mode\"), the driver allocates its private DMA TX/RX buffers\nwith kzalloc(dma_len), where dma_len is only rounded up to 4 bytes, but\nmaps, syncs and unmaps them with DMA_CACHE_ALIGNED_LEN(dma_len), i.e.\nrounded up to the cache line size. As a result, the DMA API operates on\nmemory beyond the end of the allocation.\n\nThis was observed on a custom i.MX8MP platform with an mcp251xfd CAN\ncontroller under heavy RPMSG load, as a series of refcount_t warnings\ntriggered from rpmsg_recv_done() in virtio_rpmsg_bus:\n\n  refcount_t: addition on 0; use-after-free.\n  refcount_t: underflow; use-after-free.\n  refcount_t: saturated; leaking memory.\n\nLeading finally to an \"Unable to handle kernel paging request\" oops.\nReproducing this problem took between 30 minutes and roughly 30 hours\nunder the same workload.\n\nHardware watchpoints on the refcount of a struct rpmsg_endpoint showed\nit was overwritten from 2 to 1 by __pi_memcpy_generic() in the\nirq/155-spi2.0 thread. Additionally it was found that a \"normal\"\nrpmsg_recv_done() took 11µs +/-2µs from its kref_get to kref_put. In\nthe error case the same sequence took about 215µs +/-10µs. Based on\nthis, an LLM was used to identify the size mismatch fixed here.\n\nAllocate the buffers with DMA_CACHE_ALIGNED_LEN(dma_len) so they cover\nthe full mapped length, and use the same length for\ndma_sync_single_for_cpu() to stay consistent with map and unmap.\n\nWith this patch applied, the same workload ran for more than 200 hours\nwithout the problem reproducing.","categories":["Operating systems"],"product":"Linux","vendor":"Linux","ecosystem":null,"affected_ranges":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-99164","source_modified_at":"2026-10-28T10:35:16.694Z","fetched_at":"2026-10-28T15:55:58.673066Z","product":"Linux","vendor":"Linux","versions":[{"version":"faa8e404ad8e686cb98c51dc507fdcacfb8020ce","lessThan":"2777f6637da02da84c9c1ff92f413ce0f0995084","status":"affected","versionType":"git"},{"version":"faa8e404ad8e686cb98c51dc507fdcacfb8020ce","lessThan":"59eb22641f0c526dd064390b11cff99ae87c2858","status":"affected","versionType":"git"}],"defaultStatus":"unaffected"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-99164","source_modified_at":"2026-10-28T10:35:16.694Z","fetched_at":"2026-10-28T15:55:58.673066Z","product":"Linux","vendor":"Linux","versions":[{"version":"7.0","status":"affected"},{"version":"0","lessThan":"7.0","status":"unaffected","versionType":"semver"},{"version":"7.2.13","lessThanOrEqual":"7.2.*","status":"unaffected","versionType":"semver"},{"version":"7.3","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"defaultStatus":"affected"}],"fixed_versions":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-99164","source_modified_at":"2026-10-28T10:35:16.694Z","fetched_at":"2026-10-28T15:55:58.673066Z","package":{"name":"Linux","ecosystem":null},"version":"2777f6637da02da84c9c1ff92f413ce0f0995084","basis":"first unaffected version stated in the CVE record"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-99164","source_modified_at":"2026-10-28T10:35:16.694Z","fetched_at":"2026-10-28T15:55:58.673066Z","package":{"name":"Linux","ecosystem":null},"version":"59eb22641f0c526dd064390b11cff99ae87c2858","basis":"first unaffected version stated in the CVE record"}],"cvss":null,"severity":null,"kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-28T10:35:16.694Z","modified_at":"2026-10-28T10:35:16.694Z","provenance":[{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-99164","fetched_at":"2026-10-28T15:55:58.673066Z","source_modified_at":"2026-10-28T10:35:16.694Z"}],"sources":["CVE List"],"references":[{"source":"CVE List","url":"https://git.kernel.org/stable/c/2777f6637da02da84c9c1ff92f413ce0f0995084"},{"source":"CVE List","url":"https://git.kernel.org/stable/c/59eb22641f0c526dd064390b11cff99ae87c2858"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"product","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-28T10:35:16.694Z","content_hash":"c2d604bc64b136c9542b14a1eed5dfefc75cc2b54c42d16644e3a09888a4d44a"}}
