KernelScan.io

HIGH Introduced in 2.6.31

mmc CardDetect UAF

CVE-2026-89441

CVSS 7.8 / 10.0 NVD

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

KernelScan AI6.2MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: mmc: via-sdmmc: cancel card-detect work on remove Disabling the device interrupt and freeing the IRQ prevents new card-detect work from being queued, but carddet_work already queued by the handler can still run after via_sd_remove() returns. via_sdc_card_detect() recovers the host through container_of() and dereferences its MMIO base; once remove() returns the host can be freed, so that work would touch freed memory. Cancel carddet_work after freeing the IRQ and before cancelling finish_bh_work, which the card-detect handler can also queue. carddet_work can re-enable the interrupt through via_reset_pcictrl(); mask it again afterwards. This issue was found by an in-house static analysis tool and confirmed by manual code review.

02

Engine v0.6.0

Risk summary

A race condition in the VIA SD/MMC host controller driver allows a card-detect work item to execute after the device is removed and its host structure freed, resulting in a use-after-free. Exploitation requires root-level privileges to unbind the driver or physical access to hot-remove the PCI device, and depends on timing the removal while card-detect work is pending. The freed memory dereference can corrupt kernel heap memory, potentially leading to privilege escalation or denial of service.

Affecteddrivers/mmc/host/via-sdmmc.c (mmc host controller driver)

Vulnerability analysis

When the VIA SD/MMC host controller driver is removed, it disables the device interrupt and frees the IRQ, but a card-detect work item that was already queued by the interrupt handler can still be pending and execute after the removal function returns. At that point the host structure may have been freed, so the work function dereferences freed memory when it accesses the controller's MMIO registers. The fix cancels the pending card-detect work before the host is torn down and re-masks the interrupt because the work function can re-enable it. This vulnerability is reachable only on systems with the VIA SD/MMC PCI host controller, and triggering it requires either root privileges to unbind the driver or physical access to remove the PCI device, with the race window depending on card-detect activity being in flight at removal time.

03

BranchIntroducedFixed inPatch commit
6.122.6.316.12.1120a3c70191868
6.182.6.316.18.50f7ff3027ef00
6.62.6.316.6.16055d71c70f11d
7.22.6.317.2.4eaca730c6f5e
mainline2.6.317.357e5d877f898
cip/6.122.6.316.12.112-cip330a3c70191868

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.189-cip61)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.271-cip78)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)