Deadlock Vulnerability in Linux Kernel Btrfs Package During Unmount Process
Summary
CVE-2022-49702: In the Linux kernel, the following vulnerability has been resolved: btrfs: fix hang during unmount when block group reclaim task is running When we start an unmount, at close_ctree(), if we have the reclaim task running... Affects linux versions < 5.18.14-1. Fixed in 5.18.14-1. 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 Linux kernel is the core component of Linux operating systems, managing hardware resources and providing essential services for software applications. The Btrfs (B-tree file system) is a modern file system for Linux that offers advanced features such as snapshots, dynamic inode allocation, and integrated volume management. However, it is susceptible to a deadlock issue during the unmount process when certain reclaim tasks are running, which can lead to system hangs and degraded performance.
Vulnerability Detail
The vulnerability, identified as CVE-2022-49702, occurs in the Btrfs file system of the Linux kernel. It arises when an unmount operation is initiated while a block group reclaim task is concurrently relocating data. This situation can lead to a deadlock, where the unmount process cannot proceed because it is waiting for the reclaim task to finish, while the reclaim task is also waiting for resources held by the unmount process. This results in a system hang, making the affected system unresponsive. The deadlock can be traced through kernel logs, showing the states of the involved tasks and their call traces.
How To Fix
Minimum fixed version
5.18.14-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users may avoid initiating unmount operations while block group reclaim tasks are running. Monitoring system processes and ensuring that reclaim tasks have completed before unmounting can help mitigate the risk of encountering this deadlock.
Conclusion
CVE-2022-49702 is a significant vulnerability in the Linux kernel's Btrfs file system that can lead to deadlocks during unmount operations. Users are advised to update their Linux packages to the patched version to mitigate this risk. Temporary workarounds can help manage the situation until an update is applied.
See every vulnerability recorded for linux →
FAQ
CVE-2022-49702 is a vulnerability in the Linux kernel's Btrfs file system that can cause a deadlock during the unmount process when block group reclaim tasks are active.
This vulnerability can lead to system hangs, making the affected system unresponsive and potentially causing data loss if not addressed.
If an immediate update is not possible, avoid unmounting file systems while block group reclaim tasks are running to prevent encountering the deadlock.
Detailed information about CVE-2022-49702 can be found in the official CVE database and security advisories related to the Linux kernel.
Vulert allows you to monitor and alert for open-source vulnerabilities in your software using a manifest file like package-lock.json, without requiring access to the code or installation.
Related vulnerabilities
Recent vulnerabilities recorded for linux.