
Cloud Vulnerability DB
A community-led vulnerabilities database
A vulnerability (CVE-2021-4149) was discovered in the btrfs_alloc_tree_b function within fs/btrfs/extent-tree.c of the Linux kernel. The issue was identified as an improper lock operation in btrfs, where a user with local privileges could cause a denial of service (DOS) due to a deadlock problem. The vulnerability was reported by Hao Sun and was fixed in Linux kernel version 5.15-rc6 (LKML Patch, NVD).
The vulnerability stems from a lock imbalance in an error path within the btrfs filesystem driver. In btrfs_alloc_tree_block(), after btrfs_init_new_buffer(), the new extent buffer @buf is locked, but if later operations like adding delayed tree ref fail, the kernel just frees @buf without unlocking it. This results in a deadlock condition. The issue has a CVSS v3.1 Base Score of 5.5 (Medium) with vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD).
The vulnerability allows a local user with appropriate privileges to cause a denial of service condition through a deadlock problem. This can result in system unresponsiveness and affect the availability of the system resources (NVD).
The vulnerability was fixed in Linux kernel version 5.15-rc6 through a patch that adds an unlock operation (btrfs_tree_unlock(buf)) before freeing the buffer in the error path. The fix was implemented by adding the unlock call in the out_free_buf label of the affected code (LKML Patch). Users are advised to upgrade to a kernel version containing this fix.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."