ext4: Fix ext4_mb_mark_bb() with flex_bg with fast_commit
Summary
GSD-2022-1001155: ext4: fix ext4_mb_mark_bb() with flex_bg with fast_commit. Affects Kernel versions < 803fb0e8240cc16585a5c9df76add1dfaa781773. 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 ext4 file system, which is commonly used in Linux distributions. The ext4 file system offers improved performance and reliability compared to its predecessor, ext3. It supports features such as journaling, extended attributes, and large file systems. However, a vulnerability has been discovered in the ext4_mb_mark_bb() function when used with flex_bg and fast_commit. This vulnerability could potentially be exploited by an attacker to cause a denial-of-service or execute arbitrary code.
Vulnerability Detail
The ext4_mb_mark_bb() function in the ext4 package is responsible for marking a block as bad in the ext4 file system. However, when used with flex_bg and fast_commit, it fails to properly handle certain scenarios, leading to a vulnerability. An attacker could exploit this vulnerability by crafting a malicious file system image or by mounting a specially crafted file system. This could result in a denial-of-service condition, where the system becomes unresponsive or crashes, or it could allow the attacker to execute arbitrary code with elevated privileges. The vulnerability has been fixed in Linux Kernel version v5.17.2 by commit 803fb0e8240cc16585a5c9df76add1dfaa781773.
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 Linux Kernel is not immediately feasible, a possible workaround is to disable the use of flex_bg and fast_commit in the ext4 file system. This can be achieved by modifying the file system configuration or mount options. However, it is important to note that this workaround may impact performance and other features provided by flex_bg and fast_commit.
Conclusion
The ext4 package in the Linux Kernel is vulnerable to a flaw in the ext4_mb_mark_bb() function when used with flex_bg and fast_commit. This vulnerability could allow an attacker to cause a denial-of-service or execute arbitrary code. It is recommended to update the Linux Kernel to version v5.17.2 or later to fix this vulnerability. If immediate kernel update is not possible, disabling flex_bg and fast_commit can serve as a temporary workaround. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The ext4 file system is a widely used file system in Linux distributions. It offers improved performance and reliability compared to its predecessor, ext3. It supports features such as journaling, extended attributes, and large file systems.
This vulnerability could potentially be exploited by an attacker to cause a denial-of-service or execute arbitrary code. It could result in system unresponsiveness, crashes, or unauthorized access with elevated privileges.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.17.2 or later. Alternatively, you can check if your application is affected using Vulert (https://vulert.com/scanner) without requiring access to the code or installation.
If updating the Linux Kernel is not immediately feasible, a possible workaround is to disable the use of flex_bg and fast_commit in the ext4 file system. However, this may impact performance and other features provided by flex_bg and fast_commit.
For more details about this vulnerability, you can refer to the source information provided by the Cloud Security Alliance's GSD database (https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1001xxx/GSD-2022-1001155.json).
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.