FKIE_CVE-2024-26807
Vulnerability from fkie_nvd - Published: 2024-04-04 09:15 - Updated: 2026-06-17 07:18
Severity
Summary
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.
References
Impacted products
| Vendor | Product | Version | |
|---|---|---|---|
| linux | linux_kernel | * | |
| linux | linux_kernel | * | |
| linux | linux_kernel | 4.19.283 | |
| linux | linux_kernel | 5.4.243 | |
| linux | linux_kernel | 5.10.180 | |
| linux | linux_kernel | 5.15.111 | |
| linux | linux_kernel | 6.1.28 | |
| linux | linux_kernel | 6.2.15 | |
| linux | linux_kernel | 6.3.2 | |
| linux | linux_kernel | 6.8 | |
| linux | linux_kernel | 6.8 | |
| linux | linux_kernel | 6.8 | |
| linux | linux_kernel | 6.8 | |
| linux | linux_kernel | 6.8 | |
| linux | linux_kernel | 6.8 |
{
"affected": [
{
"affectedData": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/spi/spi-cadence-quadspi.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "2c914aac9522f6e93822c18dff233d3e92399c81",
"status": "affected",
"version": "79acf7fb856eade9c3d0cf00fd34a04bf5c43a1c",
"versionType": "git"
},
{
"lessThan": "03f1573c9587029730ca68503f5062105b122f61",
"status": "affected",
"version": "2087e85bb66ee3652dafe732bb9b9b896229eafc",
"versionType": "git"
},
{
"lessThan": "34e1d5c4407c78de0e3473e1fbf8fb74dbe66d03",
"status": "affected",
"version": "2087e85bb66ee3652dafe732bb9b9b896229eafc",
"versionType": "git"
},
{
"lessThan": "32ce3bb57b6b402de2aec1012511e7ac4e7449dc",
"status": "affected",
"version": "2087e85bb66ee3652dafe732bb9b9b896229eafc",
"versionType": "git"
},
{
"status": "affected",
"version": "e3f9fc9a4f1499cc9e1bad4482d377494e367b3d",
"versionType": "git"
},
{
"status": "affected",
"version": "6716203844bc8489af5e5564f0fa31e0c094a7ff",
"versionType": "git"
},
{
"status": "affected",
"version": "b24f1ecc8fe2ceefc14af02edb1744c246d87bf7",
"versionType": "git"
},
{
"status": "affected",
"version": "d453f25faf681799d636fe9d6899ad91c45aa11e",
"versionType": "git"
},
{
"status": "affected",
"version": "18cb554e9da81bc4eca653c17a0d65e8b5835c09",
"versionType": "git"
},
{
"status": "affected",
"version": "1368dbc0a432acf9fc0dcb23bfe52d32ca4c09ab",
"versionType": "git"
},
{
"lessThan": "6.1.140",
"status": "affected",
"version": "6.1.28",
"versionType": "semver"
},
{
"lessThan": "4.20",
"status": "affected",
"version": "4.19.283",
"versionType": "semver"
},
{
"lessThan": "5.5",
"status": "affected",
"version": "5.4.243",
"versionType": "semver"
},
{
"lessThan": "5.11",
"status": "affected",
"version": "5.10.180",
"versionType": "semver"
},
{
"lessThan": "5.16",
"status": "affected",
"version": "5.15.111",
"versionType": "semver"
},
{
"lessThan": "6.3",
"status": "affected",
"version": "6.2.15",
"versionType": "semver"
},
{
"lessThan": "6.4",
"status": "affected",
"version": "6.3.2",
"versionType": "semver"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/spi/spi-cadence-quadspi.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.4"
},
{
"lessThan": "6.4",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.140",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.6.*",
"status": "unaffected",
"version": "6.6.21",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.7.*",
"status": "unaffected",
"version": "6.7.9",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.8",
"versionType": "original_commit_for_fix"
}
]
}
],
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
],
"configurations": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "584D76D2-1164-4D5F-A720-182A249B363A",
"versionEndExcluding": "6.6.21",
"versionStartIncluding": "6.4",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"matchCriteriaId": "1C538467-EDA0-4A9A-82EB-2925DE9FF827",
"versionEndExcluding": "6.7.9",
"versionStartIncluding": "6.7",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:4.19.283:*:*:*:*:*:*:*",
"matchCriteriaId": "D218D46E-9A95-4C75-A4D1-2C8957EFF613",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.4.243:*:*:*:*:*:*:*",
"matchCriteriaId": "1F43B313-8B49-45C5-BA3F-43A00C1ABFDF",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.10.180:*:*:*:*:*:*:*",
"matchCriteriaId": "E57BBF5A-3C2F-4683-90E9-C55C20DA0392",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:5.15.111:*:*:*:*:*:*:*",
"matchCriteriaId": "B8400C3E-16EB-4BE1-BFF2-F165B9C6C2DA",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.1.28:*:*:*:*:*:*:*",
"matchCriteriaId": "063461C2-6DB7-4D4D-90A5-FF26944C693A",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.2.15:*:*:*:*:*:*:*",
"matchCriteriaId": "4CB13E07-8733-47AA-B47A-ABC9AA44E4F5",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.3.2:*:*:*:*:*:*:*",
"matchCriteriaId": "7E9ED291-2EE9-4BE1-8925-FD7F622D1012",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc1:*:*:*:*:*:*",
"matchCriteriaId": "B9F4EA73-0894-400F-A490-3A397AB7A517",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc2:*:*:*:*:*:*",
"matchCriteriaId": "056BD938-0A27-4569-B391-30578B309EE3",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc3:*:*:*:*:*:*",
"matchCriteriaId": "F02056A5-B362-4370-9FF8-6F0BD384D520",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc4:*:*:*:*:*:*",
"matchCriteriaId": "62075ACE-B2A0-4B16-829D-B3DA5AE5CC41",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc5:*:*:*:*:*:*",
"matchCriteriaId": "A780F817-2A77-4130-A9B7-5C25606314E3",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:6.8:rc6:*:*:*:*:*:*",
"matchCriteriaId": "AEB9199B-AB8F-4877-8964-E2BA95B5F15C",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nBoth cadence-quadspi -\u003eruntime_suspend() and -\u003eruntime_resume()\nimplementations start with:\n\n\tstruct cqspi_st *cqspi = dev_get_drvdata(dev);\n\tstruct spi_controller *host = dev_get_drvdata(dev);\n\nThis obviously cannot be correct, unless \"struct cqspi_st\" is the\nfirst member of \" struct spi_controller\", or the other way around, but\nit is not the case. \"struct spi_controller\" is allocated by\ndevm_spi_alloc_host(), which allocates an extra amount of memory for\nprivate data, used to store \"struct cqspi_st\".\n\nThe -\u003eprobe() function of the cadence-quadspi driver then sets the\ndevice drvdata to store the address of the \"struct cqspi_st\"\nstructure. Therefore:\n\n\tstruct cqspi_st *cqspi = dev_get_drvdata(dev);\n\nis correct, but:\n\n\tstruct spi_controller *host = dev_get_drvdata(dev);\n\nis not, as it makes \"host\" point not to a \"struct spi_controller\" but\nto the same \"struct cqspi_st\" structure as above.\n\nThis obviously leads to bad things (memory corruption, kernel crashes)\ndirectly during -\u003eprobe(), as -\u003eprobe() enables the device using PM\nruntime, leading the -\u003eruntime_resume() hook being called, which in\nturns calls spi_controller_resume() with the wrong pointer.\n\nThis has at least been reported [0] to cause a kernel crash, but the\nexact behavior will depend on the memory contents.\n\n[0] https://lore.kernel.org/all/20240226121803.5a7r5wkpbbowcxgx@dhruva/\n\nThis issue potentially affects all platforms that are currently using\nthe cadence-quadspi driver."
},
{
"lang": "es",
"value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: spi: cadence-qspi: corrige la referencia del puntero en los ganchos PM en tiempo de ejecuci\u00f3n dev_get_drvdata() se utiliza para adquirir el puntero a cqspi y el controlador SPI. Ninguno de los dos integra al otro; Esto conduce a la corrupci\u00f3n de la memoria. En una plataforma determinada (Mobileye EyeQ5), la corrupci\u00f3n de la memoria est\u00e1 oculta dentro de cqspi-\u0026gt;f_pdata. Adem\u00e1s, esta memoria no inicializada se utiliza como mutex (ctlr-\u0026gt;bus_lock_mutex) por spi_controller_suspend()."
}
],
"id": "CVE-2024-26807",
"lastModified": "2026-06-17T07:18:23.977",
"metrics": {
"cvssMetricV31": [
{
"cvssData": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 5.5,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
},
"exploitabilityScore": 1.8,
"impactScore": 3.6,
"source": "nvd@nist.gov",
"type": "Primary"
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-26807",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-09-10T15:50:43.187812Z",
"version": "2.0.3"
}
}
]
},
"published": "2024-04-04T09:15:09.380",
"references": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/03f1573c9587029730ca68503f5062105b122f61"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"url": "https://git.kernel.org/stable/c/2c914aac9522f6e93822c18dff233d3e92399c81"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/32ce3bb57b6b402de2aec1012511e7ac4e7449dc"
},
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/34e1d5c4407c78de0e3473e1fbf8fb74dbe66d03"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/03f1573c9587029730ca68503f5062105b122f61"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/32ce3bb57b6b402de2aec1012511e7ac4e7449dc"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Patch"
],
"url": "https://git.kernel.org/stable/c/34e1d5c4407c78de0e3473e1fbf8fb74dbe66d03"
},
{
"source": "af854a3a-2127-422b-91ae-364da2661108",
"url": "https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html"
}
],
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"vulnStatus": "Modified",
"weaknesses": [
{
"description": [
{
"lang": "en",
"value": "CWE-787"
}
],
"source": "nvd@nist.gov",
"type": "Primary"
}
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…