Vulnerability in Linux Kernel: cfi: Fix __cfi_slowpath_diag RCU usage with cpuidle
Summary
GSD-2022-1004291: cfi: Fix __cfi_slowpath_diag RCU usage with cpuidle. Affects Kernel versions >= cf68fffb66d60d96209446bfc4a15291dc5a5d41, < ca3897f2ac02ceae5e6fa794f83c36f9885b93da. 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 Kernel is a widely used open-source operating system kernel that serves as the foundation for various Linux distributions. It provides essential functionality for managing system resources, handling hardware devices, and enabling communication between software components. The cfi (Control Flow Integrity) feature in the Linux Kernel helps protect against control flow hijacking attacks by verifying the integrity of function call targets. However, a vulnerability has been discovered in the implementation of __cfi_slowpath_diag in combination with cpuidle, which could potentially be exploited by attackers.
Vulnerability Detail
The vulnerability arises from the improper usage of RCU (Read-Copy Update) in the __cfi_slowpath_diag function when cpuidle is active. This could lead to a race condition where a freed memory object is accessed, resulting in a use-after-free vulnerability. An attacker who can trigger this race condition may be able to execute arbitrary code with kernel privileges, potentially compromising the entire system. The vulnerability was introduced in Linux Kernel version v5.13 and has been fixed in version v5.18.6.
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 essential to apply the fix by updating the Linux Kernel to a version that includes the necessary patch.
Conclusion
The vulnerability in the Linux Kernel's cfi feature, specifically in the __cfi_slowpath_diag function when used with cpuidle, could allow an attacker to execute arbitrary code with kernel privileges. It is crucial to update the Linux Kernel to version v5.18.6 or later to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The Linux Kernel is the core component of the Linux operating system, responsible for managing system resources and providing essential functionality for running software applications.
The cfi (Control Flow Integrity) feature in the Linux Kernel helps protect against control flow hijacking attacks by verifying the integrity of function call targets.
RCU (Read-Copy Update) is a synchronization mechanism used in the Linux Kernel to allow efficient read access to shared data while minimizing the impact on writers.
A use-after-free vulnerability occurs when a program continues to use a memory object after it has been freed, potentially leading to memory corruption and arbitrary code execution.
To update the Linux Kernel, you can obtain the updated kernel source code from the official Linux Kernel repository and compile it for your system. Alternatively, you can wait for your Linux distribution to provide an updated package.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.