rtc: msc313: fix NULL deref in shared IRQ handler at probe
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ be7d9c9161b9c76edeff15e79edc2f256568fe05 · < a369f48be8de426a7d2bca18dbd46c2ad1138803| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel msc313 RTC driver can dereference a NULL pointer during device probe. If another device triggers a shared IRQ before driver setup finishes, the handler can crash in interrupt context. The input does not establish whether an attacker can trigger this condition or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the msc313 RTC driver should check whether their kernel includes the fix; affected versions were not provided.