CVE-2026-31666
Last modified
CVE-2026-31666 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.12% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 6.10.1, < 6.12.82 | — |
| Linux | Linux Kernel | >= 6.13, < 6.18.23 | — |
| Linux | Linux Kernel | >= 6.19, < 6.19.13 | — |
| Linux | Linux Kernel | 6.10 | — |
| Linux | Linux Kernel | 7.0 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2026-31666?
How severe is CVE-2026-31666?
How do I fix CVE-2026-31666?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-31660In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31661In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31662In the Linux kernel, the following vulnerability has been re…7.5
- CVE-2026-31663In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31664In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31665In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31667In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-31668In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-31669In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-3167A security flaw has been discovered in Tenda F453 1.0.0.3. T…8.8
- CVE-2026-31670In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2026-31671In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2026-31666?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
