CVE-2024-26866
kernel: spi: lpspi: Avoid potential use-after-free in probe()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 17, 2024
Updated · November 21, 2025
Description
A vulnerability was found in the fsl_lpspi_probe() function in the Linux kernel, which handles memory allocation manually with the spi_alloc_host() and spi_alloc_target() functions, but also utilizes the devm_spi_register_controller() function. This could result in a potential use-after-free issue if the devm function fails, because the probe will then utilize spi_controller_put() to perform manual cleanup, but since devm also tracks this resource, it may try to access or free this memory again during the automatic cleanup performed outside of the probe function. This issue could result in crashes or system instability.
Statement
Red Hat Enterprise Linux is not impacted by this CVE, as this vulnerability does not affect the specific versions or configurations of the Linux kernel used in its distributions. This ensures that users of Red Hat Enterprise Linux are not exposed to the potential risks associated with this issue and no further action or mitigation is necessary for systems running this operating system.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 4.1CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE-416 · Use After Free