CVE-2024-46840
JSON

5.5medium

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

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.32% (higher than 17% of CVEs)
Published
Last changed
Assigned by
Linux

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

Product or packageVersionsReported by
Linux Linuxfrom 2c47e605a91dde6b0514f689645e7ab336c8592a before c847b28a799733b04574060ab9d00f215970627d, from 2c47e605a91dde6b0514f689645e7ab336c8592a before 71291aa7246645ef622621934d2067400380645e, from 2c47e605a91dde6b0514f689645e7ab336c8592a before c60676b81fab456b672796830f6d8057058f029c, from 2c47e605a91dde6b0514f689645e7ab336c8592a before 728d4d045b628e006b48a448f3326a7194c88d32, from 2c47e605a91dde6b0514f689645e7ab336c8592a before 9cc887ac24b7a0598f4042ae9af6b9a33072f75b, from 2c47e605a91dde6b0514f689645e7ab336c8592a before 7d1df13bf078ffebfedd361d714ff6cee1ff01b9, from 2c47e605a91dde6b0514f689645e7ab336c8592a before 03804641ec2d0da4fa088ad21c88e703d151ce16, from 2c47e605a91dde6b0514f689645e7ab336c8592a before b8ccef048354074a548f108e51d0557d6adfd3a3 and 1 more
Not affected: before 2.6.31, from 4.19.322 up to 4.19.*, from 5.4.284 up to 5.4.*, from 5.10.226 up to 5.10.*, from 5.15.167 up to 5.15.*, from 6.1.110 up to 6.1.*
CVE List
linux linux_kernelbefore 4.19.322, from 4.20 before 5.4.284, from 5.5 before 5.10.226, from 5.11 before 5.15.167, from 5.16 before 6.1.110, from 6.2 before 6.6.51, from 6.7 before 6.10.10NVD

Classification

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: limpia nuestro manejo de refs == 0 en la eliminación de instantáneas En reada tenemos BUG_ON(refs == 0), lo que podría ser desagradable ya que no estamos manteniendo un bloqueo en la hoja de extensión y, por lo tanto, podríamos obtener una respuesta incorrecta transitoria. En walk_down_proc también tenemos BUG_ON(refs == 0), lo que podría suceder si tenemos corrupción del árbol de extensión. Cambia eso para que devuelva -EUCLEAN. En do_walk_down() capturamos este caso y lo manejamos correctamente, sin embargo, devolvemos -EIO, que -EUCLEAN es un código de error más apropiado. Finalmente, en walk_up_proc tenemos el mismo BUG_ON(refs == 0), así que conviértelo en un manejo de errores adecuado. También ajusta el mensaje de error para que podamos hacer algo con la información.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-46840 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-46840 changed 2026-06-17Public domain