Bug 2026485 (CVE-2021-4149)

Summary: CVE-2021-4149 kernel: Improper lock operation in btrfs
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bhu, brdeoliv, bskeggs, chwhite, crwood, dhoward, dvlasenk, fhrbata, fpacheco, hdegoede, hkrzesin, jarod, jarodwilson, jburrell, jeremy, jforbes, jglisse, jlelli, jonathan, josef, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, masami256, mchehab, nmurray, ptalbert, qzhao, rkeshri, rvrbovsk, steved, vkumar, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.15 rc6 Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in btrfs_alloc_tree_b in fs/btrfs/extent-tree.c in the Linux kernel due to an improper lock operation in btrfs. In this flaw, a user with a local privilege may cause a denial of service (DOS) due to a deadlock problem.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-18 07:31:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2026492, 2034664    

Description Pedro Sampaio 2021-11-24 20:03:02 UTC
In the Linux kernel before 5.14, an improper lock operation in btrfs allows users to crash the kernel or deadlock the system. The btrfs is returning to userspace when the lock is still held. 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 free @buf without unlocking it, resulting in the deadlock.

References:

https://lkml.org/lkml/2021/10/18/885
https://lkml.org/lkml/2021/9/13/2565

Comment 8 Product Security DevOps Team 2022-01-18 07:31:09 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-4149