CVE-2024-26866: spi: lpspi: Avoid potential use-after-free in probe()
In the Linux kernel, the following vulnerability has been resolved:
spi: lpspi: Avoid potential use-after-free in probe()
fsl_lpspi_probe() is allocating/disposing memory manually with
spi_alloc_host()/spi_alloc_target(), but uses
devm_spi_register_controller(). In case of error after the latter call the
memory will be explicitly freed in the probe function by
spi_controller_put() call, but used afterwards by "devm" management outside
probe() (spi_unregister_controller() <- devm_spi_unregister() below).
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000070
...
Call trace:
kernfs_find_ns
kernfs_find_and_get_ns
sysfs_remove_group
sysfs_remove_groups
device_remove_attrs
device_del
spi_unregister_controller
devm_spi_unregister
release_nodes
devres_release_all
really_probe
driver_probe_device
__device_attach_driver
bus_for_each_drv
__device_attach
device_initial_probe
bus_probe_device
deferred_probe_work_func
process_one_work
worker_thread
kthread
ret_from_fork
Security readout for executives and security teams
Plain-English summary
CVE-2024-26866 is a Linux kernel driver bug in the Freescale/NXP LPSPI SPI controller probe path. During failed device initialization, memory can be freed manually while still registered for device-managed cleanup, leading to later use-after-free behavior and a kernel crash. Exposure appears limited to systems using this driver path.
Executive priority
Treat this as a targeted kernel reliability and availability issue, not a confirmed active exploitation emergency. Prioritize patching for embedded, industrial, or appliance fleets that use affected SPI hardware and depend on stable boot or device initialization.
Technical view
In fsl_lpspi_probe(), spi_alloc_host()/spi_alloc_target() memory is manually released with spi_controller_put() after devm_spi_register_controller() registered device-managed cleanup. On later probe error unwinding, devm_spi_unregister() can operate on already-freed controller memory, producing a sysfs/device removal crash trace.
Likely exposure
Likely exposed systems are Linux kernels with the fsl_lpspi driver enabled and matching LPSPI hardware or device tree configuration. The source does not identify broad remote exposure, container escape exposure, or user-triggerable paths.
Exploitation context
The bundle does not show CISA KEV listing, public exploitation, weaponized proof-of-concept, or remote attack evidence. The documented failure occurs during probe error handling and may primarily present as local denial of service or boot/device initialization instability.
Researcher notes
The source evidence is specific to incorrect lifetime management between manual spi_controller_put() cleanup and devm-managed unregister cleanup. CVSS, CWE, exploitability prerequisites, and attacker control are not provided, so impact beyond crash-prone error unwinding should not be assumed.
Mitigation direction
Update to a Linux kernel containing the referenced stable fixes.
Check your distribution kernel advisory for CVE-2024-26866 backport status.
Prioritize embedded or ARM systems using Freescale/NXP LPSPI controllers.
If upgrades are delayed, review whether the fsl_lpspi driver is needed.
Monitor kernel logs for LPSPI probe or spi_unregister_controller crashes.
Validation and detection
Inventory kernel versions and confirm whether fsl_lpspi is built or loaded.
Check hardware or device tree usage of Freescale/NXP LPSPI controllers.
Confirm vendor kernel packages include one of the referenced stable commits.
Review boot logs for probe failures and the documented call trace pattern.
Test affected hardware after patching to confirm SPI device initialization remains stable.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-26866 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.