ext4: Race Condition between ext4_write and ext4_convert_inline_data
Summary
GSD-2022-1002678: ext4: fix race condition between ext4_write and ext4_convert_inline_data. Affects Kernel versions >= 0c8d414f163f5d35e43a4de7a6e5ee8c253fcccf, < ccc6639f831bee91aa8b41c8a1cdd020ecfb9f32. 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 ext4 package is a file system driver for the Linux Kernel. It provides support for the fourth extended file system (ext4), which is a widely used file system in Linux distributions. The ext4 file system offers improved performance, scalability, and reliability compared to its predecessors. However, a race condition has been discovered between the ext4_write and ext4_convert_inline_data functions, which can lead to potential security vulnerabilities.
Vulnerability Detail
The race condition occurs when there is concurrent access to the same file by multiple processes. Specifically, if one process is performing a write operation (ext4_write) while another process is converting inline data (ext4_convert_inline_data) for the same file, it can result in inconsistent file state and potential data corruption. This vulnerability can be exploited by an attacker to modify or delete critical data, disrupt system operations, or escalate privileges. It was introduced in version v3.8 of the Linux Kernel and has been fixed in version v5.18.3.
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 concurrent access to the same file by ensuring that only one process performs write operations or inline data conversion at a time. This can be achieved by implementing proper synchronization mechanisms, such as file locks or exclusive access control.
Conclusion
The race condition between ext4_write and ext4_convert_inline_data in the ext4 package can lead to potential security vulnerabilities, including data corruption and unauthorized access. It is crucial to update the Linux Kernel to version v5.18.3 or later to mitigate this issue. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
ext4 is a file system driver for the Linux Kernel, providing support for the fourth extended file system (ext4). It offers improved performance, scalability, and reliability compared to its predecessors.
A race condition is a software flaw that occurs when the behavior of a program depends on the relative timing of events. In this case, the race condition arises when multiple processes access the same file concurrently, leading to potential data corruption.
The vulnerability can be exploited by an attacker to modify or delete critical data, disrupt system operations, or escalate privileges. It poses a risk to the integrity and availability of the affected system.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.
Yes, as a temporary workaround, you can ensure that only one process performs write operations or inline data conversion at a time by implementing proper synchronization mechanisms, such as file locks or exclusive access control.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.