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.
History

Tue, 24 Dec 2024 14:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-415

Tue, 08 Oct 2024 18:30:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel

Sun, 29 Sep 2024 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 28 Sep 2024 01:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Fri, 27 Sep 2024 12:45:00 +0000

Type Values Removed Values Added
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.
Title btrfs: clean up our handling of refs == 0 in snapshot delete
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published: 2024-09-27T12:39:34.998Z

Updated: 2024-12-19T09:24:25.735Z

Reserved: 2024-09-11T15:12:18.288Z

Link: CVE-2024-46840

cve-icon Vulnrichment

Updated: 2024-09-29T13:59:37.873Z

cve-icon NVD

Status : Analyzed

Published: 2024-09-27T13:15:16.057

Modified: 2024-10-08T18:15:07.857

Link: CVE-2024-46840

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-09-27T00:00:00Z

Links: CVE-2024-46840 - Bugzilla