Fix Compaction Sysfs File Leak in Linux Kernel
Summary
GSD-2022-1003895: drivers/base/node.c: fix compaction sysfs file leak. Affects Kernel versions >= ed4a6d7f0676db50b5023cc01f6cda82a2f2a307, < f76ddc8fcf6d81fe89bfa4d3efcbc4fe69a91d48. 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 hardware resources, scheduling tasks, and facilitating communication between software and hardware components. The 'drivers/base/node.c' file in the Linux Kernel is responsible for handling node-related operations, including memory compaction. Memory compaction is a process that aims to reduce fragmentation in memory by rearranging memory pages. However, a vulnerability exists in the 'node.c' file that can lead to a sysfs file leak.
Vulnerability Detail
The vulnerability in 'drivers/base/node.c' allows for a sysfs file leak. Sysfs is a virtual file system in Linux that provides a structured view of the kernel's device hierarchy. When memory compaction is performed, the 'node.c' file creates a sysfs file to track the compaction status. However, due to a coding error, the file is not properly cleaned up after the compaction process is complete. This can result in a resource leak, consuming system resources and potentially leading to a denial-of-service condition. An attacker may be able to exploit this vulnerability to exhaust system resources and disrupt normal system operation.
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 workaround, users can manually remove the sysfs file created by the 'node.c' file after the memory compaction process is complete. This can be done by navigating to the appropriate sysfs directory and deleting the corresponding file. However, this workaround is not recommended as it requires manual intervention and may not be feasible in all scenarios.
Conclusion
The vulnerability in 'drivers/base/node.c' of the Linux Kernel can lead to a sysfs file leak, potentially causing a denial-of-service condition. It is recommended to update the Linux Kernel to version v4.19.247 or later to fix this issue. Users can obtain the updated kernel from the official Linux Kernel repository. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a sysfs file leak, consuming system resources and potentially causing a denial-of-service condition.
An attacker may exploit this vulnerability to exhaust system resources and disrupt normal system operation.
The vulnerability was introduced in version v2.6.35 by commit ed4a6d7f0676db50b5023cc01f6cda82a2f2a307 and is fixed in version v4.19.247 by commit f76ddc8fcf6d81fe89bfa4d3efcbc4fe69a91d48.
Yes, a workaround involves manually removing the sysfs file created by the 'node.c' file after the memory compaction process is complete. However, this workaround is not recommended.
Users can obtain the updated Linux Kernel from the official Linux Kernel repository.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.