CVE-2026-31666CWE-754

CVE-2026-31666

High · published April 24, 2026

CVSS v3.1
7.8
EPSS
0%
Percentile
6.6
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00175 · 6.6th percentile
Weakness
CWE-754 · Improper Check for Unusual or Exceptional Conditions
Published
2026-04-24T19:16Z
Affected products (11)
ProductVersionsFixed in
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernelall versions—
linux/linux_kernel≥ 6.10.1, < 6.12.826.12.82
linux/linux_kernel≥ 6.13, < 6.18.236.18.23
linux/linux_kernel≥ 6.19, < 6.19.136.19.13
References (4)
EPSS history
Timeline
  • 24 APR 14:45Z
    btrfs: fix incorrect return value after changing leaf in lookup_extent_data_ref()
    cvelistv5