CVE-2021-4149
Linux Kernel vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Mitigation and workarounds

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.

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-68753HIGH7.8
  • Linux KernelLinux Kernel
  • linux-fips
NoYesJan 05, 2026
CVE-2025-68756HIGH7.1
  • Linux KernelLinux Kernel
  • linux-gcp-fips
NoYesJan 05, 2026
CVE-2025-68764MEDIUM5.5
  • Linux KernelLinux Kernel
  • linux-oracle-6.8
NoYesJan 05, 2026
CVE-2025-68758MEDIUM5.5
  • Linux KernelLinux Kernel
  • linux-nvidia-6.8
NoYesJan 05, 2026
CVE-2025-68762N/AN/A
  • Linux KernelLinux Kernel
  • kernel-devel
NoYesJan 05, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management