Deadlock between concurrent dio writes in btrfs when low on free data space
Summary
GSD-2022-1002856: btrfs: fix deadlock between concurrent dio writes when low on free data space. Affects Kernel versions >= f0bfa76a11e93d0fe2c896fcb566568c5e8b5d3f, < cfae6f765b3c40882ee90dae8fbf9325c8de9c35. 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 btrfs package is a file system for Linux that provides advanced features such as snapshots, pooling, and checksums. It is widely used in various Linux distributions. However, a vulnerability has been discovered in btrfs that can lead to a deadlock when there are concurrent direct I/O (dio) writes and the system is low on free data space.
Vulnerability Detail
The vulnerability in btrfs arises when multiple processes attempt to perform dio writes simultaneously while the system is running out of free data space. This can result in a deadlock, where the processes are unable to proceed and the system becomes unresponsive. The deadlock occurs due to a race condition in the btrfs code that handles dio writes. If left unaddressed, this vulnerability can lead to denial of service, data corruption, or other unpredictable behavior.
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
There is no specific workaround mentioned for this vulnerability. However, users can mitigate the risk by ensuring that there is sufficient free data space available on the system. Regular monitoring of disk usage and freeing up space when necessary can help prevent the occurrence of this vulnerability.
Conclusion
In conclusion, the btrfs package in Linux Kernel versions prior to v5.18.3 is vulnerable to a deadlock when there are concurrent dio writes and low free data space. This vulnerability can lead to denial of service, data corruption, or other unpredictable behavior. It is recommended to update the Linux Kernel to version v5.18.3 or later to fix this vulnerability. Regular monitoring of disk usage and freeing up space when necessary can also help mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
btrfs is a file system for Linux that provides advanced features such as snapshots, pooling, and checksums. It is widely used in various Linux distributions.
A deadlock is a situation where two or more processes are unable to proceed because each is waiting for the other to release a resource. In the case of this vulnerability, the deadlock occurs when multiple processes are attempting concurrent dio writes and the system is low on free data space.
If left unaddressed, this vulnerability can lead to denial of service, data corruption, or other unpredictable behavior. The system may become unresponsive and require a reboot to recover.
You can use Vulert's playground at Vulert Scanner to check if your system is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just a manifest file like package-lock.json.
For more details about this vulnerability, you can refer to the vulnerability report in the GSD database: https://github.com/cloudsecurityalliance/gsd-database/blob/main/2022/1002xxx/GSD-2022-1002856.json
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.