KernelScan.io

HIGH Introduced in 5.8

mmc RetryWork UAF

CVE-2026-98212

CVSS 7.0 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: mmc: hsq: Fix use-after-free in retry work mmc_hsq_pump_requests() queues retry_work when request_atomic() returns -EBUSY; today sdhci-sprd is the only consumer that implements request_atomic(). The work is embedded in a devm-allocated mmc_hsq, but is never cancelled during driver removal. Work still pending at unbind can therefore run after the devm allocation has been released and dereference hsq->mmc and hsq->mrq. Use devm_work_autocancel() to cancel and drain retry_work before the devm allocation is released. By the time devres cleanup begins, mmc_remove_host() has already stopped the host, so no new requests can arm the work. This issue was found by an in-house static analysis tool.

02

Engine v0.7.0

Risk summary

A use-after-free in the MMC host software queue (mmc_hsq) driver allows a local user to trigger kernel memory corruption by causing MMC I/O activity that arms a retry work item, then having the driver unbind while that work is still pending. The freed structure is dereferenced by the stale work handler, potentially leading to kernel crash or arbitrary memory read/write. This specifically affects systems using the Spreadtrum sdhci-sprd SD host controller.

Affecteddrivers/mmc/host/mmc_hsq.c (mmc hsq)

Vulnerability analysis

The driver uses a background work item to retry requests when the SD card is busy. This work item belongs to a data structure that is freed during driver removal. If the work item is still waiting to run when the driver is removed, the cleanup frees the structure first, and the work item later accesses memory that has already been freed. The fix ensures the work item is cancelled and finishes before the structure is released. A local user can trigger the issue by performing I/O on a system that uses the Spreadtrum SD host controller, the only hardware that uses the atomic request path which arms the retry work.

03

BranchIntroducedFixed inPatch commit
6.125.86.12.112df2eb59fd9eb
6.185.86.18.548439bf262ce3
6.65.86.6.158c50d6515bffb
7.25.87.2.845341b341642
mainline5.87.35d132990475f
cip/6.125.86.12.112-cip33df2eb59fd9eb

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.112-cip33
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)