CVE-2024-41078

btrfs: qgroup: fix quota root leak after quota disable failure

MEDIUM
5.5
CVSS Score
Published: July 29, 2024 at 03:04 PM UTC
Updated: June 17, 2026 at 07:47 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: qgroup: fix quota root leak after quota disable failure If during the quota disable we fail when cleaning the quota tree or when deleting the root from the root tree, we jump to the 'out' label without ever dropping the reference on the quota root, resulting in a leak of the root since fs_info->quota_root is no longer pointing to the root (we have set it to NULL just before those steps). Fix this by always doing a btrfs_put_root() call under the 'out' label. This is a problem that exists since qgroups were first added in 2012 by commit bed92eae26cc ("Btrfs: qgroup implementation and prototypes"), but back then we missed a kfree on the quota root and free_extent_buffer() calls on its root and commit root nodes, since back then roots were not yet reference counted.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.10.2233.6 ≤ v < 5.10.2233.6 ≤ v < 5.15.1643.6 ≤ v < 6.1.1013.6 ≤ v < 6.103.6 ≤ v < 6.6.423.6 ≤ v < 6.9.115.11 ≤ v < 5.15.1645.16 ≤ v < 6.1.1016.2 ≤ v < 6.6.426.7 ≤ v < 6.9.113.66.10 rc16.10 rc26.10 rc36.10 rc46.10 rc5bed92eae26ccf280d1a2168b7509447b56675a27
Vendor states this is fixed in 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51 (fixed)
Vendor states this is fixed in 7dd6a5b96157a21245566b21fd58276a214357ff (fixed)
Vendor states this is fixed in 8a69529f22590b67bb018de9acbcf94abc8603cf (fixed)
Vendor states this is fixed in 94818bdb00ef34a996a06aa63d11f591074cb757 (fixed)
Vendor states this is fixed in a7e4c6a3031c74078dba7fa36239d0f4fe476c53 (fixed)
Vendor states this is fixed in f88aeff5a173e8ba3133314eb4b964236ef3589d (fixed)
Vendor states this is fixed in 3.6 (unaffected)
Vendor states this is fixed in 5.10.223 (unaffected)
Vendor states this is fixed in 5.15.164 (unaffected)
Vendor states this is fixed in 6.1.101 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6.42 (unaffected)
Vendor states this is fixed in 6.9.11 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5ef3961682e5310f2221bae99bcf9f5d0f4b0d51
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7dd6a5b96157a21245566b21fd58276a214357ff
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8a69529f22590b67bb018de9acbcf94abc8603cf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/94818bdb00ef34a996a06aa63d11f591074cb757
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a7e4c6a3031c74078dba7fa36239d0f4fe476c53
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f88aeff5a173e8ba3133314eb4b964236ef3589d
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card