CVE-2024-26807

spi: cadence-qspi: fix pointer reference in runtime PM hooks

MEDIUM
5.5
CVSS Score
Published: April 4, 2024 at 08:20 AM UTC
Updated: August 5, 2026 at 12:04 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: Both cadence-quadspi ->runtime_suspend() and ->runtime_resume() implementations start with: struct cqspi_st *cqspi = dev_get_drvdata(dev); struct spi_controller *host = dev_get_drvdata(dev); This obviously cannot be correct, unless "struct cqspi_st" is the first member of " struct spi_controller", or the other way around, but it is not the case. "struct spi_controller" is allocated by devm_spi_alloc_host(), which allocates an extra amount of memory for private data, used to store "struct cqspi_st". The ->probe() function of the cadence-quadspi driver then sets the device drvdata to store the address of the "struct cqspi_st" structure. Therefore: struct cqspi_st *cqspi = dev_get_drvdata(dev); is correct, but: struct spi_controller *host = dev_get_drvdata(dev); is not, as it makes "host" point not to a "struct spi_controller" but to the same "struct cqspi_st" structure as above. This obviously leads to bad things (memory corruption, kernel crashes) directly during ->probe(), as ->probe() enables the device using PM runtime, leading the ->runtime_resume() hook being called, which in turns calls spi_controller_resume() with the wrong pointer. This has at least been reported [0] to cause a kernel crash, but the exact behavior will depend on the memory contents. [0] https://lore.kernel.org/all/20240226121803.5a7r5wkpbbowcxgx@dhruva/ This issue potentially affects all platforms that are currently using the cadence-quadspi driver.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 4.19.283v ≥ 5.10.180v ≥ 5.15.111v ≥ 5.4.243v ≥ 6.2.15v ≥ 6.3.24.19.283 ≤ v < 4.205.10.180 ≤ v < 5.115.15.111 ≤ v < 5.165.4.243 ≤ v < 5.56.1.28 ≤ v < 6.1.1406.2.15 ≤ v < 6.36.3.2 ≤ v < 6.46.4 ≤ v < 6.6.216.4 ≤ v < 6.7.96.4 ≤ v < 6.86.7 ≤ v < 6.7.91368dbc0a432acf9fc0dcb23bfe52d32ca4c09ab18cb554e9da81bc4eca653c17a0d65e8b5835c092087e85bb66ee3652dafe732bb9b9b896229eafc4.19.2835.10.1805.15.1115.4.2436.1.286.2.156.3.26.8 rc16.8 rc26.8 rc36.8 rc46.8 rc56.8 rc66716203844bc8489af5e5564f0fa31e0c094a7ff79acf7fb856eade9c3d0cf00fd34a04bf5c43a1cb24f1ecc8fe2ceefc14af02edb1744c246d87bf7d453f25faf681799d636fe9d6899ad91c45aa11ee3f9fc9a4f1499cc9e1bad4482d377494e367b3d
Vendor states this is fixed in 03f1573c9587029730ca68503f5062105b122f61 (fixed)
Vendor states this is fixed in 2c914aac9522f6e93822c18dff233d3e92399c81 (fixed)
Vendor states this is fixed in 32ce3bb57b6b402de2aec1012511e7ac4e7449dc (fixed)
Vendor states this is fixed in 34e1d5c4407c78de0e3473e1fbf8fb74dbe66d03 (fixed)
Affected range stops below 4.20, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.11, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.16, so it looks safe — our inference, not a vendor statement
Affected range stops below 5.5, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 6.1.140 (unaffected)
Affected range stops below 6.3, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 6.4 (unaffected)
Vendor states this is fixed in 6.6.21 (unaffected)
Vendor states this is fixed in 6.7.9 (unaffected)
Vendor states this is fixed in 6.8 (unaffected)

References (5)

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card