CVE-2024-46840
btrfs: clean up our handling of refs == 0 in snapshot delete
Check your servers for CVE-2024-46840
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-46840 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: clean up our handling of refs == 0 in snapshot delete
In reada we BUG_ON(refs == 0), which could be unkind since we aren't holding a lock on the extent leaf and thus could get a transient incorrect answer. In walk_down_proc we also BUG_ON(refs == 0), which could happen if we have extent tree corruption. Change that to return -EUCLEAN. In do_walk_down() we catch this case and handle it correctly, however we return -EIO, which -EUCLEAN is a more appropriate error code. Finally in walk_up_proc we have the same BUG_ON(refs == 0), so convert that to proper error handling. Also adjust the error message so we can actually do something with the information.
Exploitation
EPSS 0.26%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 19.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 29 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.
| Product | Versions |
|---|---|
| Linux |
affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before c847b28a799733b04574060ab9d00f215970627d affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before 71291aa7246645ef622621934d2067400380645e affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before c60676b81fab456b672796830f6d8057058f029c affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before 728d4d045b628e006b48a448f3326a7194c88d32 affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before 9cc887ac24b7a0598f4042ae9af6b9a33072f75b affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before 7d1df13bf078ffebfedd361d714ff6cee1ff01b9 affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before 03804641ec2d0da4fa088ad21c88e703d151ce16 affected from 2c47e605a91dde6b0514f689645e7ab336c8592a, before b8ccef048354074a548f108e51d0557d6adfd3a3
Other versions: unaffected
|
| Linux |
affected 2.6.31 unaffected before 2.6.31 unaffected from 4.19.322 up to and including 4.19.* unaffected from 5.4.284 up to and including 5.4.* unaffected from 5.10.226 up to and including 5.10.* unaffected from 5.15.167 up to and including 5.15.* unaffected from 6.1.110 up to and including 6.1.* unaffected from 6.6.51 up to and including 6.6.* unaffected from 6.10.10 up to and including 6.10.* unaffected 6.11 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-46840 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-46840
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-46840
trivy image --scanners vuln IMAGE | grep CVE-2024-46840
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
- https://git.kernel.org/stable/c/c847b28a799733b04574060ab9d00f215970627d git.kernel.org
- https://git.kernel.org/stable/c/71291aa7246645ef622621934d2067400380645e git.kernel.org
- https://git.kernel.org/stable/c/c60676b81fab456b672796830f6d8057058f029c git.kernel.org
- https://git.kernel.org/stable/c/728d4d045b628e006b48a448f3326a7194c88d32 git.kernel.org
- https://git.kernel.org/stable/c/9cc887ac24b7a0598f4042ae9af6b9a33072f75b git.kernel.org
- https://git.kernel.org/stable/c/7d1df13bf078ffebfedd361d714ff6cee1ff01b9 git.kernel.org
- https://git.kernel.org/stable/c/03804641ec2d0da4fa088ad21c88e703d151ce16 git.kernel.org
- https://git.kernel.org/stable/c/b8ccef048354074a548f108e51d0557d6adfd3a3 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html lists.debian.org
Source: the record CVE-2024-46840 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.
Vulnpocalypse