CVE-2025-40306
BaseFortify
Publication date: 2025-12-08
Last updated on: 2025-12-08
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| orangefs | orangefs | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in the Linux kernel's orangefs component involves a buffer overflow related to extended attributes (xattr). The helper function `xattr_key()` incorrectly uses a pointer variable in a loop condition without dereferencing it, causing the loop to not terminate properly and potentially walk memory indefinitely. This can lead to kernel crashes (kernel oops), hung user processes, and corrupted orangefs files. Additionally, a memory leak was found in the xattr cache due to improper use of the kernel hashing macro `hash_add`, which caused memory allocations that were never freed. The fix involved correcting the loop condition and replacing `hash_add` with `hlist_add_head` to stop the memory leak.
How can this vulnerability impact me? :
This vulnerability can cause serious system instability including kernel crashes, hung user processes, and file corruption within orangefs. It can also lead to memory leaks that may cause the system to run out of memory (OOM), impacting system availability and reliability.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing kernel oops messages, hung user processes, or corrupted orangefs files when using extended attributes (xattr). Commands such as 'setfattr' and 'getfattr' can be used to test for the vulnerability by attempting to set and get extended attributes on files, which may reproduce the kernel oops or hangs if the system is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves applying the patch that replaces the use of 'hash_add' with 'hlist_add_head' in the orangefs xattr cache handling to prevent memory leaks and kernel hangs. Until the patch is applied, avoid operations that heavily use extended attributes on orangefs, such as frequent 'getattr' calls for 'security.capability', to reduce the risk of triggering the vulnerability.