Kernel Crash Vulnerability in Linux Package: CVE-2024-26796
Summary
DEBIAN-CVE-2024-26796: In the Linux kernel, the following vulnerability has been resolved: drivers: perf: ctr_get_width function for legacy is not defined With parameters CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n linux kernel crashe... Affects linux versions < 6.7.9-1. Fixed in 6.7.9-1. 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 package is a core component of the Debian operating system, responsible for managing hardware interactions and system resources. It provides essential functionalities that allow applications to communicate with the hardware. The package is widely used in various environments, from servers to personal computers. This vulnerability specifically affects the RISC-V architecture, where certain configurations can lead to system crashes during performance monitoring operations.
Vulnerability Detail
In the Linux kernel, a vulnerability has been identified in the 'perf' subsystem, specifically within the 'ctr_get_width' function for legacy configurations. When the parameters CONFIG_RISCV_PMU_LEGACY is set to 'y' and CONFIG_RISCV_PMU_SBI is set to 'n', the kernel crashes upon executing performance recording commands, such as 'perf record ls'. This crash occurs due to a NULL pointer dereference, which can lead to system instability and potential data loss. The absence of a defined 'ctr_get_width' function in legacy cases is the root cause of this issue, as it is invoked in the 'arch_perf_update_userpage' function.
How To Fix
Minimum fixed version
6.7.9-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using performance monitoring tools like 'perf' with the specified configurations until the package is updated. This can prevent the kernel from crashing during performance recording operations.
Conclusion
The CVE-2024-26796 vulnerability in the Linux kernel poses a significant risk for systems using specific configurations related to performance monitoring. It is crucial to update the affected package to ensure system stability and security. Utilizing tools like Vulert can help in monitoring for such vulnerabilities effectively.
See every vulnerability recorded for linux →
FAQ
CVE-2024-26796 is a vulnerability in the Linux kernel that can cause system crashes when using performance monitoring tools under specific configurations.
If your system is configured with CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n, using performance monitoring commands can lead to kernel crashes and instability.
You should update your Linux package to version 6.7.9-1 or later to fix the vulnerability.
Yes, you can use Vulert, which monitors open-source vulnerabilities in your software using a manifest file like package-lock.json. You can check your application for this vulnerability using the Vulert playground without signup.
Yes, the permanent fix is to update the Linux package to the patched version. Regularly updating your system will help mitigate such vulnerabilities.
References
Related vulnerabilities
Recent vulnerabilities recorded for linux.