Btrfs Relocation Vulnerability in Linux Kernel: Snapshot Deletion Race Condition
Summary
CVE-2022-48901: In the Linux kernel, the following vulnerability has been resolved: btrfs: do not start relocation until in progress drops are done We hit a bug with a recovering relocation on mount for one of our file systems in produc... Affects linux versions 5.10.103-1 – 6.9.9-1. 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 Linux kernel is the core component of Linux operating systems, managing hardware resources and providing essential services for software applications. Btrfs (B-tree file system) is a modern file system for Linux that supports advanced features like snapshots, dynamic inode allocation, and integrated volume management. However, it is susceptible to a race condition between snapshot deletion and relocation processes, leading to potential data integrity issues.
Vulnerability Detail
The vulnerability arises from a race condition in the Btrfs file system where snapshot deletion and relocation can occur simultaneously. This situation can lead to a corrupted state where a snapshot is only partially deleted, causing errors during extent item lookups. The issue is exacerbated if a balance operation is pending, which can result in system crashes and data loss. The specific error manifests as a warning in the kernel logs, indicating a failure in the lookup of inline extent back references, which can compromise the stability of the file system.
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 running snapshot deletions and balance operations simultaneously. Ensure that any snapshot deletions are fully completed before initiating a balance operation to prevent the race condition from occurring.
Conclusion
The Btrfs relocation vulnerability in the Linux kernel presents a significant risk due to the potential for data corruption during concurrent snapshot deletions and relocations. Users are advised to update their systems promptly to mitigate this risk and ensure the integrity of their file systems.
See every vulnerability recorded for linux →
FAQ
The CVSS score for this vulnerability is 5.5, indicating a moderate level of severity.
The vulnerability affects all versions of the Linux kernel prior to 5.16.14-1.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
If exploited, this vulnerability can lead to data corruption, system crashes, and loss of file system integrity.
Yes, the permanent fix is to update the Linux kernel to version 5.16.14-1 or later, which addresses the race condition.
Related vulnerabilities
Recent vulnerabilities recorded for linux.