Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-31666

HIGH 7.8EPSS 5%

btrfs: fix incorrect return value after changing leaf in lookup_extent_data_ref()

Mitigation

  • Upgrade Linux to 316fb1b3169efb081d2db910cbbfef445afa03b9 or later.

Who should check

  • Anyone running Linux >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 4125a194db4a6cf91f619f38788272651cb97dce; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 450e6a685d0cad95b15f8af152057bd0bf79f50b; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < ab1e022379c3c811aa72da8eb0c7507859a1d0f5; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 316fb1b3169efb081d2db910cbbfef445afa03b9
  • Anyone running Linux 6.10

Vulnerability facts

Affected
Linux >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 4125a194db4a6cf91f619f38788272651cb97dce; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 450e6a685d0cad95b15f8af152057bd0bf79f50b; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < ab1e022379c3c811aa72da8eb0c7507859a1d0f5; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 316fb1b3169efb081d2db910cbbfef445afa03b9; Linux 6.10
Fixed in
Linux 4125a194db4a6cf91f619f38788272651cb97dce, Linux 450e6a685d0cad95b15f8af152057bd0bf79f50b, Linux 316fb1b3169efb081d2db910cbbfef445afa03b9
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.18% chance of exploitation in 30 days (percentile 5, 2026-11-26)
CWE
CWE-754
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 1618aa3c2e0163f5ac34d514ae89474521910536, < 4125a194db4a6cf91f619f38788272651cb97dce; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 450e6a685d0cad95b15f8af152057bd0bf79f50b; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < ab1e022379c3c811aa72da8eb0c7507859a1d0f5; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 316fb1b3169efb081d2db910cbbfef445afa03b9—cvelist
Linux6.10—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-31666. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31666.md
Affected: Linux >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 4125a194db4a6cf91f619f38788272651cb97dce; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 450e6a685d0cad95b15f8af152057bd0bf79f50b; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < ab1e022379c3c811aa72da8eb0c7507859a1d0f5; >= 1618aa3c2e0163f5ac34d51…
Fixed in: Linux 4125a194db4a6cf91f619f38788272651cb97dce, Linux 450e6a685d0cad95b15f8af152057bd0bf79f50b, Linux 316fb1b3169efb081d2db910cbbfef445afa03b9

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-31666 being exploited?

There is no confirmed exploitation: CVE-2026-31666 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-31666?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2026-31666?

Linux >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 4125a194db4a6cf91f619f38788272651cb97dce; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 450e6a685d0cad95b15f8af152057bd0bf79f50b; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < ab1e022379c3c811aa72da8eb0c7507859a1d0f5; >= 1618aa3c2e0163f5ac34d514ae89474521910536, < 316fb1b3169efb081d2db910cbbfef445afa03b9; Linux 6.10.

Is there a fix for CVE-2026-31666?

Yes. Fixed in Linux 4125a194db4a6cf91f619f38788272651cb97dce, Linux 450e6a685d0cad95b15f8af152057bd0bf79f50b, Linux 316fb1b3169efb081d2db910cbbfef445afa03b9. Upgrade Linux to 316fb1b3169efb081d2db910cbbfef445afa03b9 or later.

How do I check if I'm affected by CVE-2026-31666?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors