CVE-2024-26866: linux-libc-dev - Avoid potential use-after-free in probe()
Summary
CVE-2024-26866: 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()... Affects linux versions 5.10.103-1 – 6.9.9-1. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The linux-libc-dev package is a development package for the Linux kernel. It provides the necessary header files and libraries for compiling programs that interact with the kernel. This package is commonly used by developers to build and test kernel modules and other low-level software components. The vulnerability identified as CVE-2024-26866 affects the linux-libc-dev package and specifically the spi: lpspi component. This vulnerability could lead to a use-after-free issue in the probe() function, potentially resulting in a kernel NULL pointer dereference and system crash.
Vulnerability Detail
The vulnerability arises from the fsl_lpspi_probe() function, which manually allocates and disposes of memory using spi_alloc_host() and spi_alloc_target(). However, it also uses devm_spi_register_controller(), which can cause a problem if an error occurs after this call. In such cases, the memory allocated earlier will be explicitly freed in the probe function using spi_controller_put(). However, the memory is still used by the "devm" management outside of the probe() function, leading to a use-after-free vulnerability. This vulnerability can be triggered by an attacker or through certain system conditions, potentially resulting in a kernel NULL pointer dereference and system crash.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the official patch or update the linux-libc-dev package to the latest version as soon as possible.
Conclusion
The linux-libc-dev package is vulnerable to a use-after-free issue in the spi: lpspi component. This vulnerability can be exploited to trigger a kernel NULL pointer dereference and system crash. To mitigate this risk, it is crucial to update the linux-libc-dev package to version 6.1.90-1 or later. Users should promptly apply the official patch or update the package using their distribution's package management system. For further assistance or support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for linux →
FAQ
Linux-libc-dev is a development package for the Linux kernel, providing header files and libraries for compiling programs that interact with the kernel.
This vulnerability can lead to a use-after-free issue in the spi: lpspi component of the linux-libc-dev package, potentially resulting in a kernel NULL pointer dereference and system crash.
To fix this vulnerability, it is recommended to update the linux-libc-dev package to version 6.1.90-1 or later. This update includes the necessary patches to address the use-after-free issue.
There is no known workaround for this vulnerability. It is recommended to apply the official patch or update the linux-libc-dev package to the latest version.
More information about this vulnerability can be found in the CVE-2024-26866 entry on the National Vulnerability Database (NVD) website.
Related vulnerabilities
Recent vulnerabilities recorded for linux.