Vulnerability in Kernel: mm: khugepaged: skip huge page collapse for special files
Summary
GSD-2021-1002126: mm: khugepaged: skip huge page collapse for special files. Affects Kernel versions >= 99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0, < 5fcb6fce74ffa614d964667110cf1a516c48c6d9. 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 Kernel is a critical component of the Linux operating system that manages system resources and facilitates communication between hardware and software. It provides essential functions for memory management, process scheduling, and device drivers. The vulnerability in question affects the khugepaged module, which is responsible for collapsing huge pages to improve memory utilization. However, this vulnerability allows special files to bypass the collapse process, potentially leading to memory corruption or privilege escalation.
Vulnerability Detail
The vulnerability arises from a flaw in the khugepaged module of the Kernel. It fails to properly handle special files, allowing them to skip the huge page collapse process. This can be exploited by an attacker to manipulate memory mappings and potentially gain unauthorized access or execute arbitrary code. The impact of this vulnerability could range from local privilege escalation to remote code execution, depending on the attacker's capabilities and the system's configuration.
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
As a temporary workaround, users can disable the khugepaged module by modifying the Kernel's configuration. This can be achieved by adding the 'nohugepages' parameter to the kernel command line. However, this workaround may impact system performance and should only be considered if immediate patching is not feasible. Here is an example of how to add the parameter:
- Open the '/etc/default/grub' file in a text editor.
- Locate the line starting with 'GRUB_CMDLINE_LINUX'.
- Append 'nohugepages' to the existing parameters within the quotation marks.
- Save the file and exit the text editor.
- Run the command 'sudo update-grub' to apply the changes.
- Restart the system for the changes to take effect.
Conclusion
In conclusion, the vulnerability in the Kernel's khugepaged module can allow special files to bypass the huge page collapse process, potentially leading to memory corruption or privilege escalation. It is crucial to update the Linux Kernel to version v5.14.16 or later to address this vulnerability. Users can also consider the temporary workaround of disabling the khugepaged module, but this may impact system performance. For further support and assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability can vary depending on the attacker's capabilities and the system's configuration. It could potentially lead to local privilege escalation or remote code execution.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. It analyzes your manifest file, such as package-lock.json, and provides real-time alerts for open-source vulnerabilities.
Yes, a temporary workaround is to disable the khugepaged module by adding the 'nohugepages' parameter to the kernel command line. However, this may impact system performance and should only be used if immediate patching is not possible.
To update the Linux Kernel, you can obtain the latest version from the official Linux Kernel repository or through your distribution's package manager. It is recommended to update to version v5.14.16 or later to address this vulnerability.
After updating the Kernel, it is important to restart the system to ensure the new Kernel is loaded and the vulnerability is mitigated. Additionally, it is advisable to monitor for any unusual behavior or further security advisories related to the Kernel.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.