ovl: fix NULL pointer dereference in copy up warning
Summary
GSD-2022-1000278: ovl: fix NULL pointer dereference in copy up warning. Affects Kernel versions >= 5cffa333a2b263821561328cc75a3ffc8097d093, < e6b678c1a3673de6a5d2f4e22bb725a086a0701a. 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 ovl package is a component of the Linux Kernel, which is responsible for implementing overlay file systems. Overlay file systems allow multiple file systems to be layered on top of each other, providing a unified view of the files and directories. The ovl package specifically handles copy-up operations, which involve copying files from a lower layer to a higher layer in the overlay file system. This vulnerability in the ovl package can lead to a NULL pointer dereference, causing the system to crash or potentially allowing an attacker to execute arbitrary code.
Vulnerability Detail
The vulnerability in the ovl package arises from a NULL pointer dereference in the copy-up warning mechanism. When performing a copy-up operation, the ovl package checks if the source file has been modified since the overlay was created. If the source file has been modified, a warning message is printed. However, due to a programming error, the ovl package does not properly handle cases where the source file is missing or inaccessible. This can result in a NULL pointer dereference when attempting to access the file attributes, leading to a system crash or potential code execution by an attacker.
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
If updating the Kernel is not immediately feasible, a temporary workaround can be implemented by disabling the overlay file system or avoiding copy-up operations. Disabling the overlay file system can be achieved by unmounting any overlay file systems currently in use. Avoiding copy-up operations involves refraining from modifying files in the overlay file system that have already been copied from a lower layer.
Conclusion
The ovl package in the Linux Kernel is vulnerable to a NULL pointer dereference issue in the copy-up warning mechanism. This vulnerability can result in a system crash or potential code execution. It is recommended to update the Kernel to version v5.15.20 or later to fix this vulnerability. If immediate updating is not possible, workarounds such as disabling the overlay file system or avoiding copy-up operations can be implemented. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a system crash or potential code execution by an attacker.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will analyze the dependencies and alert you if any vulnerabilities, including this one, are found.
Yes, a fix is available in Linux Kernel version v5.15.20. Updating the Kernel to this version or later will resolve the vulnerability.
Yes, if updating the Kernel is not immediately feasible, you can temporarily disable the overlay file system or avoid copy-up operations.
The vulnerability itself does not provide remote exploitation capabilities. However, if an attacker already has access to the system, they may be able to leverage this vulnerability to execute arbitrary code.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.