CVE-2024-36930·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: spi: fix null pointer dereference within spi_sync If spi_sync() is called with the non-empty queue and the same spi_message is then reused, the complete callback for the message remains set while the context is cleared, leading to a null pointer dereference when the callback is invoked from spi_finalize_current_message(). With function inlining disabled, the call stack might look like this: _raw_spin_lock_irqsave from complete_with_flags+0x18/0x58 complete_with_flags from spi_complete+0x8/0xc spi_complete from spi_finalize_current_message+0xec/0x184 spi_finalize_current_message from spi_transfer_one_message+0x2a8/0x474 spi_transfer_one_message from __spi_pump_transfer_message+0x104/0x230 __spi_pump_transfer_message from __spi_transfer_message_noqueue+0x30/0xc4 __spi_transfer_message_noqueue from __spi_sync+0x204/0x248 __spi_sync from spi_sync+0x24/0x3c spi_sync from mcp251xfd_regmap_crc_read+0x124/0x28c [mcp251xfd] mcp251xfd_regmap_crc_read [mcp251xfd] from _regmap_raw_read+0xf8/0x154 _regmap_raw_read from _regmap_bus_read+0x44/0x70 _regmap_bus_read from _regmap_read+0x60/0xd8 _regmap_read from regmap_read+0x3c/0x5c regmap_read from mcp251xfd_alloc_can_err_skb+0x1c/0x54 [mcp251xfd] mcp251xfd_alloc_can_err_skb [mcp251xfd] from mcp251xfd_irq+0x194/0xe70 [mcp251xfd] mcp251xfd_irq [mcp251xfd] from irq_thread_fn+0x1c/0x78 irq_thread_fn from irq_thread+0x118/0x1f4 irq_thread from kthread+0xd8/0xf4 kthread from ret_from_fork+0x14/0x28 Fix this by also setting message->complete to NULL when the transfer is complete.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.8.10
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 4% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 6.7
Until: 6.8.10
Fixed in: 6.8.10
How to fix this CVE
Update your Linux kernel to version 6.8.10 or later to resolve a null pointer dereference in the SPI subsystem that occurs when reusing SPI messages. This flaw can cause kernel crashes under specific SPI transfer patterns, particularly affecting CAN bus drivers and other SPI-dependent hardware. Apply the patch immediately to maintain system stability and prevent unexpected downtime.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run `uname -r` to check the current kernel version; vulnerable versions are 6.7.x through 6.8.9
- Check if SPI devices are in use: `lsmod | grep spi` — look for spi_core, mcp251xfd, or similar SPI driver modules
- Search kernel logs for SPI-related crashes: `dmesg | grep -i 'spi\|null pointer\|oops'` or `journalctl -b | grep -i spi`
- Verify the patch is installed by confirming kernel version is 6.8.10 or later with `uname -r`
FAQ
What is CVE-2024-36930?
This vulnerability is a null pointer dereference in the Linux kernel's SPI (Serial Peripheral Interface) subsystem that occurs when an SPI message is reused while still queued, causing the completion callback to reference cleared context data and triggering a kernel crash.
Is CVE-2024-36930 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and no public exploits are available. Exploitation requires local access and specific SPI driver conditions.
What versions of Kernel are affected by CVE-2024-36930?
Linux kernel versions 6.7.0 through 6.8.9 are affected. Kernel 6.8.10 and later contain the fix.
How do I check if my server is vulnerable to CVE-2024-36930?
Run `uname -r` and compare the output to the affected range (6.7.x to 6.8.9). If your version falls within this range and SPI devices are active, your system is vulnerable.
Does Defensia detect CVE-2024-36930?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-36930 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/2070d008cc08bff50a58f0f4d30f12d3ebf94c00
- https://git.kernel.org/stable/c/4756fa529b2f12b7cb8f21fe229b0f6f47190829
- https://git.kernel.org/stable/c/a30659f1576d2c8e62e7426232bb18b885fd951a
- https://git.kernel.org/stable/c/e005d6754e3e440257006795b687c4ad8733b493
- https://git.kernel.org/stable/c/2070d008cc08bff50a58f0f4d30f12d3ebf94c00
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-36930. Free for 1 server.
Get started free