CVE-2024-41078

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

No CVSS score yet EPSS 0.22%

Published 29 Jul 2024 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2024-41078

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-41078 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.8% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 10 Sep 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before 94818bdb00ef34a996a06aa63d11f591074cb757
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before 8a69529f22590b67bb018de9acbcf94abc8603cf
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before 5ef3961682e5310f2221bae99bcf9f5d0f4b0d51
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before f88aeff5a173e8ba3133314eb4b964236ef3589d
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before 7dd6a5b96157a21245566b21fd58276a214357ff
affected from bed92eae26ccf280d1a2168b7509447b56675a27, before a7e4c6a3031c74078dba7fa36239d0f4fe476c53
Other versions: unaffected
Linux
affected 3.6
unaffected before 3.6
unaffected from 5.10.223 up to and including 5.10.*
unaffected from 5.15.164 up to and including 5.15.*
unaffected from 6.1.101 up to and including 6.1.*
unaffected from 6.6.42 up to and including 6.6.*
unaffected from 6.9.11 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-41078 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-41078

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-41078
trivy image --scanners vuln IMAGE | grep CVE-2024-41078

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-41078 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.