Vulnerability in Kernel package: ubifs: Fix 'ui->dirty' race between do_tmpfile() and writeback work
Summary
GSD-2022-1001762: ubifs: Fix 'ui->dirty' race between do_tmpfile() and writeback work. Affects Kernel versions >= 474b93704f32163af4bfa728fddc570eba357353, < a9662bec5a4dfc87b1503e26aec1aadfdf521658. 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 package is a crucial component of the Linux operating system, responsible for managing the system's core functionality. It provides an interface between the hardware and software layers, allowing applications to communicate with the underlying hardware. The ubifs subsystem within the Kernel package is responsible for handling the Unsorted Block Image File System (UBIFS), which is a flash file system designed for NAND flash memory devices. UBIFS provides wear-leveling, compression, and other features to optimize flash memory usage. However, a vulnerability has been identified in the ubifs subsystem that could lead to a race condition between the 'do_tmpfile()' function and writeback work, potentially resulting in data corruption or system instability.
Vulnerability Detail
The vulnerability in the ubifs subsystem arises due to a race condition between the 'do_tmpfile()' function and writeback work. This race condition can occur when multiple threads or processes attempt to access and modify the same file simultaneously. If the 'ui->dirty' flag is set during the execution of 'do_tmpfile()', it can lead to incorrect handling of the file's metadata during the subsequent writeback work. This can result in data corruption or system instability, potentially leading to a denial-of-service (DoS) scenario or unauthorized access to sensitive information. The vulnerability was introduced in version v4.9 of the Linux Kernel and has been fixed in version v5.15.33.
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 avoid triggering the race condition by minimizing concurrent access to files handled by the ubifs subsystem. This can be achieved by limiting the number of processes or threads that perform read and write operations on the affected files simultaneously. Additionally, ensuring proper synchronization mechanisms, such as file locks or mutexes, are used when accessing shared files can help mitigate the risk of encountering the race condition. However, applying the official fix by updating the Kernel package is strongly recommended to fully address the vulnerability.
Conclusion
In conclusion, the ubifs subsystem in the Kernel package is vulnerable to a race condition between 'do_tmpfile()' and writeback work. This can result in data corruption, system instability, and potential unauthorized access to sensitive information. It is crucial to update the Linux Kernel package to version v5.15.33 or later to mitigate this vulnerability. Users can also utilize the Vulert Playground at https://vulert.com/scanner to check if their system is affected by this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability in the ubifs subsystem can lead to data corruption or system instability. It may result in a denial-of-service (DoS) scenario or unauthorized access to sensitive information.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert analyzes the package-lock.json file to identify and alert for open-source vulnerabilities in the software.
Yes, as a temporary workaround, you can minimize concurrent access to files handled by the ubifs subsystem and ensure proper synchronization mechanisms are in place. However, applying the official fix by updating the Kernel package is strongly recommended.
The vulnerability was introduced in version v4.9 of the Linux Kernel. All versions between v4.9 and v5.15.32 (inclusive) are affected. It has been fixed in version v5.15.33.
You can obtain the updated Kernel package from the official Linux Kernel repository or through your respective Linux distribution's package management system. Ensure that the updated package is properly installed and the system is rebooted to apply the changes.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.