Linux Kernel up to 6.12.81/6.18.22/6.19.12 lookup_extent_data_ref return value

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.3$0-$5k0.00

Summaryinfo

A vulnerability classified as critical has been found in Linux Kernel up to 6.12.81/6.18.22/6.19.12. Impacted is the function lookup_extent_data_ref. Performing a manipulation results in return value. This vulnerability was named CVE-2026-31666. There is no available exploit. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability, which was classified as critical, was found in Linux Kernel up to 6.12.81/6.18.22/6.19.12. This affects the function lookup_extent_data_ref. The manipulation with an unknown input leads to a return value vulnerability. CWE is classifying the issue as CWE-252. The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. The impact remains unknown. The summary by CVE 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.

It is possible to read the advisory at git.kernel.org. This vulnerability is uniquely identified as CVE-2026-31666 since 03/09/2026. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 04/24/2026).

Upgrading to version 6.12.82, 6.18.23 or 6.19.13 eliminates this vulnerability. Applying the patch 4125a194db4a6cf91f619f38788272651cb97dce/450e6a685d0cad95b15f8af152057bd0bf79f50b/ab1e022379c3c811aa72da8eb0c7507859a1d0f5/316fb1b3169efb081d2db910cbbfef445afa03b9 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at EUVD (EUVD-2026-25559). Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.5
VulDB Meta Temp Score: 5.3

VulDB Base Score: 5.5
VulDB Temp Score: 5.3
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Return value
CWE: CWE-252 / CWE-253
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 6.12.82/6.18.23/6.19.13
Patch: 4125a194db4a6cf91f619f38788272651cb97dce/450e6a685d0cad95b15f8af152057bd0bf79f50b/ab1e022379c3c811aa72da8eb0c7507859a1d0f5/316fb1b3169efb081d2db910cbbfef445afa03b9

Timelineinfo

03/09/2026 CVE reserved
04/24/2026 +45 days Advisory disclosed
04/24/2026 +0 days VulDB entry created
04/24/2026 +0 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2026-31666 (🔒)
GCVE (CVE): GCVE-0-2026-31666
GCVE (VulDB): GCVE-100-359463
EUVD: 🔒

Entryinfo

Created: 04/24/2026 18:59
Updated: 04/24/2026 19:35
Changes: 04/24/2026 18:59 (58), 04/24/2026 19:35 (1)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!