# CVE-2024-36930: spi: fix null pointer dereference within spi\_sync

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-05-30T15:29:22.012Z
- **Modified:** 2026-06-17T07:37:23.250Z

## Who should check

- Anyone running Linux \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< e005d6754e3e440257006795b687c4ad8733b493; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< a30659f1576d2c8e62e7426232bb18b885fd951a; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 2070d008cc08bff50a58f0f4d30f12d3ebf94c00; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 4756fa529b2f12b7cb8f21fe229b0f6f47190829
- Anyone running Linux 6.0

## Description

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.

## Affected and fixed versions

- Linux: \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< e005d6754e3e440257006795b687c4ad8733b493; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< a30659f1576d2c8e62e7426232bb18b885fd951a; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 2070d008cc08bff50a58f0f4d30f12d3ebf94c00; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 4756fa529b2f12b7cb8f21fe229b0f6f47190829 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 4756fa529b2f12b7cb8f21fe229b0f6f47190829 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-36930. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-36930.md
Affected: Linux >= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, < e005d6754e3e440257006795b687c4ad8733b493; >= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, < a30659f1576d2c8e62e7426232bb18b885fd951a; >= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, < 2070d008cc08bff50a58f0f4d30f12d3ebf94c00; >= ae7d2346dc89ae89a6e0aab…
Fixed in: Linux 2070d008cc08bff50a58f0f4d30f12d3ebf94c00, Linux 4756fa529b2f12b7cb8f21fe229b0f6f47190829

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-36930 being exploited?

There is no confirmed exploitation: CVE-2024-36930 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-36930?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-36930?

Linux \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< e005d6754e3e440257006795b687c4ad8733b493; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< a30659f1576d2c8e62e7426232bb18b885fd951a; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 2070d008cc08bff50a58f0f4d30f12d3ebf94c00; \>= ae7d2346dc89ae89a6e0aabe6037591a11e593c0, \< 4756fa529b2f12b7cb8f21fe229b0f6f47190829; Linux 6.0.

### Is there a fix for CVE-2024-36930?

Yes. Fixed in Linux 2070d008cc08bff50a58f0f4d30f12d3ebf94c00, Linux 4756fa529b2f12b7cb8f21fe229b0f6f47190829. Upgrade Linux to 4756fa529b2f12b7cb8f21fe229b0f6f47190829 or later.

### How do I check if I'm affected by CVE-2024-36930?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e005d6754e3e440257006795b687c4ad8733b493>
- patch: <https://git.kernel.org/stable/c/a30659f1576d2c8e62e7426232bb18b885fd951a>
- patch: <https://git.kernel.org/stable/c/2070d008cc08bff50a58f0f4d30f12d3ebf94c00>
- patch: <https://git.kernel.org/stable/c/4756fa529b2f12b7cb8f21fe229b0f6f47190829>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-36930>

HTML: <https://flawdb.com/CVE-2024-36930> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-36930>
