CVE-2026-31666

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix incorrect return value after changing leaf in lookup_extent_data_ref() After commit 1618aa3c2e01 ("btrfs: simplify return variables in lookup_extent_data_ref()"), the err and ret variables were merged into a single ret variable. However, when btrfs_next_leaf() returns 0 (success), ret is overwritten from -ENOENT to 0. If the first key in the next leaf does not match (different objectid or type), the function returns 0 instead of -ENOENT, making the caller believe the lookup succeeded when it did not. This can lead to operations on the wrong extent tree item, potentially causing extent tree corruption. Fix this by returning -ENOENT directly when the key does not match, instead of relying on the ret variable.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.10:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*

History

11 Nov 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: btrfs: corrige el valor de retorno incorrecto después de cambiar la hoja en lookup_extent_data_ref() Después del commit 1618aa3c2e01 (’btrfs: simplifica las variables de retorno en lookup_extent_data_ref()’), las variables err y ret se fusionaron en una única variable ret. Sin embargo, cuando btrfs_next_leaf() devuelve 0 (éxito), ret se sobrescribe de -ENOENT a 0. Si la primera clave en la siguiente hoja no coincide (diferente objectid o tipo), la función devuelve 0 en lugar de -ENOENT, haciendo que el llamador crea que la búsqueda tuvo éxito cuando no fue así. Esto puede llevar a operaciones en el elemento incorrecto del árbol de extensiones, potencialmente causando corrupción del árbol de extensiones. Corrige esto devolviendo -ENOENT directamente cuando la clave no coincide, en lugar de depender de la variable ret.

19 Oct 2026, 19:18

Type Values Removed Values Added
CWE CWE-754

Information

Published : 2026-04-24 15:16

Updated : 2026-11-11 23:10


NVD link : CVE-2026-31666

Mitre link : CVE-2026-31666

CVE.ORG link : CVE-2026-31666


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
NVD-CWE-noinfo CWE-754

Improper Check for Unusual or Exceptional Conditions