# CVE-2024-41078: btrfs: qgroup: fix quota root leak after quota disable failure

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-401
- **Published:** 2024-07-29T15:04:15.812Z
- **Modified:** 2026-06-17T07:47:14.097Z

## Who should check

- Anyone running Linux \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 94818bdb00ef34a996a06aa63d11f591074cb757; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 8a69529f22590b67bb018de9acbcf94abc8603cf; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< f88aeff5a173e8ba3133314eb4b964236ef3589d; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 7dd6a5b96157a21245566b21fd58276a214357ff; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< a7e4c6a3031c74078dba7fa36239d0f4fe476c53
- Anyone running Linux 3.6

## 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 and fixed versions

- Linux: \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 94818bdb00ef34a996a06aa63d11f591074cb757; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 8a69529f22590b67bb018de9acbcf94abc8603cf; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< f88aeff5a173e8ba3133314eb4b964236ef3589d; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 7dd6a5b96157a21245566b21fd58276a214357ff; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< a7e4c6a3031c74078dba7fa36239d0f4fe476c53 (cvelist)
- Linux: 3.6 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-41078. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-41078.md
Affected: Linux >= bed92eae26ccf280d1a2168b7509447b56675a27, < 94818bdb00ef34a996a06aa63d11f591074cb757; >= bed92eae26ccf280d1a2168b7509447b56675a27, < 8a69529f22590b67bb018de9acbcf94abc8603cf; >= bed92eae26ccf280d1a2168b7509447b56675a27, < 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51; >= bed92eae26ccf280d1a2168…
Fixed in: Linux 94818bdb00ef34a996a06aa63d11f591074cb757, Linux 8a69529f22590b67bb018de9acbcf94abc8603cf, Linux 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51, Linux 7dd6a5b96157a21245566b21fd58276a214357ff

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-41078 being exploited?

There is no confirmed exploitation: CVE-2024-41078 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-41078?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-41078?

Linux \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 94818bdb00ef34a996a06aa63d11f591074cb757; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 8a69529f22590b67bb018de9acbcf94abc8603cf; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< f88aeff5a173e8ba3133314eb4b964236ef3589d; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< 7dd6a5b96157a21245566b21fd58276a214357ff; \>= bed92eae26ccf280d1a2168b7509447b56675a27, \< a7e4c6a3031c74078dba7fa36239d0f4fe476c53; Linux 3.6.

### Is there a fix for CVE-2024-41078?

Yes. Fixed in Linux 94818bdb00ef34a996a06aa63d11f591074cb757, Linux 8a69529f22590b67bb018de9acbcf94abc8603cf, Linux 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51, Linux 7dd6a5b96157a21245566b21fd58276a214357ff. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-41078?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/94818bdb00ef34a996a06aa63d11f591074cb757>
- patch: <https://git.kernel.org/stable/c/8a69529f22590b67bb018de9acbcf94abc8603cf>
- patch: <https://git.kernel.org/stable/c/5ef3961682e5310f2221bae99bcf9f5d0f4b0d51>
- patch: <https://git.kernel.org/stable/c/f88aeff5a173e8ba3133314eb4b964236ef3589d>
- patch: <https://git.kernel.org/stable/c/7dd6a5b96157a21245566b21fd58276a214357ff>
- patch: <https://git.kernel.org/stable/c/a7e4c6a3031c74078dba7fa36239d0f4fe476c53>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-41078>

HTML: <https://flawdb.com/CVE-2024-41078> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-41078>
