Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97502 Overview
CVE-2026-97502 is a NULL pointer dereference vulnerability in the Linux kernel's davinci_mmc driver. The flaw resides in the mmc_davinci_irq() interrupt handler in drivers/mmc/host/davinci_mmc.c. The handler returns early only when both host->cmd and host->data are NULL, so execution can legitimately continue with host->data == NULL. The TOUTRD (read data timeout) and CRCWR/CRCRD (data CRC error) branches dereference the data pointer without a NULL check. If either status bit fires while host->data is NULL, the kernel crashes inside the IRQ handler. The issue was flagged by the smatch static analyzer and has been resolved upstream.
Critical Impact
A NULL pointer dereference inside an interrupt handler produces a kernel oops, triggering a denial-of-service condition on affected DaVinci-based MMC/SD host hardware.
Affected Products
- Linux kernel drivers/mmc/host/davinci_mmc.c DaVinci MMC/SD host controller driver
- Platforms using the DaVinci MMC hardware block (TI DaVinci and related SoCs)
- Kernel branches prior to the fixes referenced in commits 4f28846, 5b7e151, and a01cedf
Discovery Timeline
- 2026-09-24 - CVE-2026-97502 published to NVD
- 2026-09-28 - Last updated in NVD database
Technical Details for CVE-2026-97502
Vulnerability Analysis
The mmc_davinci_irq() function processes MMC host controller interrupts for DaVinci hardware. The handler reads the quick-status register into qstatus and dispatches on its bits. An early-return guard exits the handler only when both host->cmd and host->data are NULL, which means the remaining branches must tolerate either pointer being NULL individually.
The DATDNE (data done) branch already respects this contract with an explicit if (data != NULL) check. The subsequent branches handling MMCST0_TOUTRD and MMCST0_CRCWR | MMCST0_CRCRD do not. They assign data->error = -ETIMEDOUT or data->error = -EILSEQ and then call davinci_abort_data(host, data) without validating data. When the controller raises a timeout or CRC error with no in-flight data transfer tracked by the driver, the write to data->error dereferences a NULL pointer in interrupt context.
Root Cause
The root cause is inconsistent NULL-pointer handling across sibling branches of the same interrupt dispatcher. The smatch static analyzer reported: drivers/mmc/host/davinci_mmc.c:933 mmc_davinci_irq() error: we previously assumed 'data' could be null (see line 914). The fix gates both affected branches on a non-NULL data, matching the pattern used by the DATDNE branch. There is no functional change for callers where data is non-NULL.
Attack Vector
The attack vector is local and requires hardware conditions that cause the MMC controller to raise TOUTRD or CRC error interrupts while the driver has no active data transfer. Reaching the vulnerable path typically depends on physical access to the DaVinci-based device, a faulty or malicious SD/MMC card, or signal-level faults on the MMC bus. Successful triggering results in a kernel oops and host instability rather than code execution or privilege escalation. The vulnerability mechanism is described in the upstream commit messages; see the kernel git references for technical details.
// No verified exploit code is available for this issue.
// See the kernel.org commit references for the patch diff.
Detection Methods for CVE-2026-97502
Indicators of Compromise
- Kernel panic or oops messages referencing mmc_davinci_irq, davinci_abort_data, or NULL pointer dereference in drivers/mmc/host/davinci_mmc.c
- Unexpected device resets or MMC/SD subsystem failures on DaVinci hardware under I/O error conditions
- dmesg entries showing MMC CRC or timeout errors immediately preceding a crash
Detection Strategies
- Audit running kernel versions on DaVinci and TI SoC-based devices and compare against the patched commits 4f28846, 5b7e151, and a01cedf
- Run the smatch static analyzer against custom or downstream kernel trees to confirm the warning is resolved
- Review crash dumps and kdump captures for faulting instructions inside mmc_davinci_irq
Monitoring Recommendations
- Forward kernel logs from embedded Linux devices to a centralized logging platform for crash correlation
- Alert on repeated MMC host controller resets or storage subsystem errors on affected hardware
- Track distribution and vendor kernel advisories for backports referencing the DaVinci MMC fix
How to Mitigate CVE-2026-97502
Immediate Actions Required
- Apply the upstream kernel fix from commits 4f28846, 5b7e151, or a01cedf to all affected kernel branches
- Rebuild and redeploy kernels for DaVinci-based embedded devices and verify the mmc_davinci_irq NULL guard is present
- Prioritize patching on systems that handle untrusted or user-replaceable SD/MMC media
Patch Information
The fix adds a non-NULL check for data before processing MMCST0_TOUTRD and MMCST0_CRCWR | MMCST0_CRCRD branches in mmc_davinci_irq(). Patches are available in the stable kernel tree: Kernel Git Commit 4f28846, Kernel Git Commit 5b7e151, and Kernel Git Commit a01cedf.
Workarounds
- Where patching is not immediately possible, restrict physical access to MMC/SD slots on affected DaVinci devices
- Avoid using media known to produce frequent CRC or read-timeout errors on DaVinci hardware
- Unload the davinci_mmc module on systems where MMC functionality is not required
# Verify kernel version and inspect loaded MMC driver
uname -r
lsmod | grep davinci_mmc
# Optionally unload the driver on systems that do not require MMC
sudo rmmod davinci_mmc
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

