CVE-2026-72424: rtc: msc313: fix NULL deref in shared IRQ handler at probe
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rtc: msc313: fix NULL deref in shared IRQ handler at probe
msc313_rtc_probe() calls devm_request_irq() with IRQF_SHARED and &pdev->dev as the cookie, but platform_set_drvdata() is only called later after the clock setup. With a shared IRQ line, another device on the same line can trigger the handler in that window. The handler does dev_get_drvdata() on the cookie, gets NULL, and dereferences priv->rtc_base in interrupt context.
Pass priv as the cookie directly so the handler reads it from dev_id without the lookup, removing the dependency on probe order.
The Linux kernel CVE team has assigned CVE-2026-72424 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 6.1.178 with commit ece7b9ffde23e2ccd7567761ac27463ded43932c Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 6.6.145 with commit 52c73b6992b46ed476590ed526faa033d4fbfc5d Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 6.12.97 with commit bc1f61a9b97d65de21c2681bcf0b5b1392c58486 Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 6.18.40 with commit 1f6a4aec0d36647eb2f67cd69db22bd28cabe2cb Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 7.1.5 with commit bb3e624808c981fe881cb79037be63e680ed7d38 Issue introduced in 5.16 with commit be7d9c9161b9c76edeff15e79edc2f256568fe05 and fixed in 7.2-rc1 with commit a369f48be8de426a7d2bca18dbd46c2ad1138803
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-72424
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/rtc/rtc-msc313.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/ece7b9ffde23e2ccd7567761ac27463ded43932c https://git.kernel.org/stable/c/52c73b6992b46ed476590ed526faa033d4fbfc5d https://git.kernel.org/stable/c/bc1f61a9b97d65de21c2681bcf0b5b1392c58486 https://git.kernel.org/stable/c/1f6a4aec0d36647eb2f67cd69db22bd28cabe2cb https://git.kernel.org/stable/c/bb3e624808c981fe881cb79037be63e680ed7d38 https://git.kernel.org/stable/c/a369f48be8de426a7d2bca18dbd46c2ad1138803