Linux Kernel up to 6.17.7 xattr_key buffer overflow

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.
7.6$0-$5k0.00

Summaryinfo

A vulnerability was found in Linux Kernel up to 6.17.7. It has been classified as critical. This impacts the function xattr_key. This manipulation causes buffer overflow. This vulnerability is tracked as CVE-2025-40306. No exploit exists. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability was found in Linux Kernel up to 6.17.7. It has been declared as critical. Affected by this vulnerability is the function xattr_key. The manipulation with an unknown input leads to a buffer overflow vulnerability. The CWE definition for the vulnerability is CWE-120. The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buffer overflow. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:

In the Linux kernel, the following vulnerability has been resolved: orangefs: fix xattr related buffer overflow... Willy Tarreau <[email protected]> forwarded me a message from Disclosure <[email protected]> with the following warning: > The helper `xattr_key()` uses the pointer variable in the loop condition > rather than dereferencing it. As `key` is incremented, it remains non-NULL > (until it runs into unmapped memory), so the loop does not terminate on > valid C strings and will walk memory indefinitely, consuming CPU or hanging > the thread. I easily reproduced this with setfattr and getfattr, causing a kernel oops, hung user processes and corrupted orangefs files. Disclosure sent along a diff (not a patch) with a suggested fix, which I based this patch on. After xattr_key started working right, xfstest generic/069 exposed an xattr related memory leak that lead to OOM. xattr_key returns a hashed key. When adding xattrs to the orangefs xattr cache, orangefs used hash_add, a kernel hashing macro. hash_add also hashes the key using hash_log which resulted in additions to the xattr cache going to the wrong hash bucket. generic/069 tortures a single file and orangefs does a getattr for the xattr "security.capability" every time. Orangefs negative caches on xattrs which includes a kmalloc. Since adds to the xattr cache were going to the wrong bucket, every getattr for "security.capability" resulted in another kmalloc, none of which were ever freed. I changed the two uses of hash_add to hlist_add_head instead and the memory leak ceased and generic/069 quit throwing furniture.

The advisory is shared at git.kernel.org. This vulnerability is known as CVE-2025-40306 since 04/16/2025. The exploitation appears to be easy. Technical details are known, but no exploit is available. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 02/23/2026).

The vulnerability scanner Nessus provides a plugin with the ID 278559 (Debian dla-4404 : ata-modules-5.10.0-35-armmp-di - security update), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 5.4.302, 5.10.247, 5.15.197, 6.1.159, 6.6.117, 6.12.58 or 6.17.8 eliminates this vulnerability. Applying the patch c6564ff6b53c9a8dc786b6f1c51ae7688273f931/ef892d2bf4f3fa2c8de1677dd307e678bdd3d865/15afebb9597449c444801d1ff0b8d8b311f950ab/bc812574de633cf9a9ad6974490e45f6a4bb5126/e09a096104fc65859422817fb2211f35855983fe/9127d1e90c90e5960c8bc72a4ce2c209691a7021/c2ca015ac109fd743fdde27933d59dc5ad46658e 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 databases at Tenable (278559), EUVD (EUVD-2025-201639) and CERT Bund (WID-SEC-2025-2756). If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Affected

  • Google Container-Optimized OS
  • Debian Linux
  • Amazon Linux 2
  • Red Hat Enterprise Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • NetApp FAS
  • NetApp AFF
  • SUSE openSUSE
  • RESF Rocky Linux
  • Open Source Linux Kernel
  • Microsoft Azure Linux

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.0
VulDB Meta Temp Score: 7.6

VulDB Base Score: 8.0
VulDB Temp Score: 7.6
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

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

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

Exploitinginfo

Class: Buffer overflow
CWE: CWE-120 / CWE-119
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

Nessus ID: 278559
Nessus Name: Debian dla-4404 : ata-modules-5.10.0-35-armmp-di - security update

Threat Intelligenceinfo

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

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 5.4.302/5.10.247/5.15.197/6.1.159/6.6.117/6.12.58/6.17.8
Patch: c6564ff6b53c9a8dc786b6f1c51ae7688273f931/ef892d2bf4f3fa2c8de1677dd307e678bdd3d865/15afebb9597449c444801d1ff0b8d8b311f950ab/bc812574de633cf9a9ad6974490e45f6a4bb5126/e09a096104fc65859422817fb2211f35855983fe/9127d1e90c90e5960c8bc72a4ce2c209691a7021/c2ca015ac109fd743fdde27933d59dc5ad46658e

Timelineinfo

04/16/2025 CVE reserved
12/08/2025 +236 days Advisory disclosed
12/08/2025 +0 days VulDB entry created
02/23/2026 +77 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-40306 (🔒)
GCVE (CVE): GCVE-0-2025-40306
GCVE (VulDB): GCVE-100-334717
EUVD: 🔒
CERT Bund: WID-SEC-2025-2756 - Linux Kernel: Mehrere Schwachstellen erm&ouml;glichen Denial of Service

Entryinfo

Created: 12/08/2025 06:20
Updated: 02/23/2026 08:22
Changes: 12/08/2025 06:20 (58), 12/08/2025 06:27 (1), 12/13/2025 16:41 (2), 12/20/2025 22:49 (1), 01/04/2026 13:59 (7), 01/23/2026 06:47 (1), 02/23/2026 08:22 (1)
Complete: 🔍
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!