CVE-2024-46840

btrfs: clean up our handling of refs == 0 in snapshot delete

MEDIUM
5.5
CVSS Score
Published: September 27, 2024 at 12:39 PM UTC
Updated: June 17, 2026 at 07:56 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.3%
SSVC
No known exploit

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.

Affected

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

v < 4.19.3222.6.31 ≤ v < 4.19.3222.6.31 ≤ v < 5.10.2262.6.31 ≤ v < 5.15.1672.6.31 ≤ v < 5.4.2842.6.31 ≤ v < 6.1.1102.6.31 ≤ v < 6.10.102.6.31 ≤ v < 6.112.6.31 ≤ v < 6.6.514.20 ≤ v < 5.4.2845.11 ≤ v < 5.15.1675.16 ≤ v < 6.1.1105.5 ≤ v < 5.10.2266.2 ≤ v < 6.6.516.7 ≤ v < 6.10.102.6.312c47e605a91dde6b0514f689645e7ab336c8592a
Vendor states this is fixed in 03804641ec2d0da4fa088ad21c88e703d151ce16 (fixed)
Vendor states this is fixed in 71291aa7246645ef622621934d2067400380645e (fixed)
Vendor states this is fixed in 728d4d045b628e006b48a448f3326a7194c88d32 (fixed)
Vendor states this is fixed in 7d1df13bf078ffebfedd361d714ff6cee1ff01b9 (fixed)
Vendor states this is fixed in 9cc887ac24b7a0598f4042ae9af6b9a33072f75b (fixed)
Vendor states this is fixed in b8ccef048354074a548f108e51d0557d6adfd3a3 (fixed)
Vendor states this is fixed in c60676b81fab456b672796830f6d8057058f029c (fixed)
Vendor states this is fixed in c847b28a799733b04574060ab9d00f215970627d (fixed)
Vendor states this is fixed in 2.6.31 (unaffected)
Vendor states this is fixed in 4.19.322 (unaffected)
Vendor states this is fixed in 5.10.226 (unaffected)
Vendor states this is fixed in 5.15.167 (unaffected)
Vendor states this is fixed in 5.4.284 (unaffected)
Vendor states this is fixed in 6.1.110 (unaffected)
Vendor states this is fixed in 6.10.10 (unaffected)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.6.51 (unaffected)

References (10)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/03804641ec2d0da4fa088ad21c88e703d151ce16
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/71291aa7246645ef622621934d2067400380645e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/728d4d045b628e006b48a448f3326a7194c88d32
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7d1df13bf078ffebfedd361d714ff6cee1ff01b9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9cc887ac24b7a0598f4042ae9af6b9a33072f75b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b8ccef048354074a548f108e51d0557d6adfd3a3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c60676b81fab456b672796830f6d8057058f029c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c847b28a799733b04574060ab9d00f215970627d

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
NVD-CWE-noinfo

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