Cloudanix VulnDB

CVE-2025-40306

None

CVSS

—

EPSS

0.2%

Published

Dec 8, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A bug in Linux filesystem handling can make the system crash, hang or run out of memory when certain file attributes are read or changed.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Low
Impact
Denial Of Service
Component
OS kernel
Class
Buffer Overflow
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Incorrect pointer check in xattr_key() causes unbounded memory walk instead of terminating on valid strings; misuse of hash_add places xattr cache entries in wrong buckets resulting in repeated kmalloc without frees and memory leak.

Why it matters to the business

Kernel oops, hung processes, file corruption, high CPU usage and potential out-of-memory conditions on systems using orangefs; low EPSS and no KEV status indicate limited active exploitation risk despite 322 days since publication.

How an attack unfolds

Local attacker invokes setfattr or getfattr against files on an orangefs filesystem, triggering the faulty loop condition and cache misplacement; repeated getattr operations on attributes like security.capability amplify the leak until resource exhaustion or crash occurs.

How to fix it

Apply upstream kernel fix replacing hash_add with hlist_add_head and correcting xattr_key loop; upgrade affected ghostscript packages on Ubuntu 14.04 LTS and 16.04 LTS to 9.26~dfsg+0-0ubuntu0.14.04.1 or 9.26~dfsg+0-0ubuntu0.16.04.1 respectively.

How to confirm the fix worked

Confirm kernel source contains corrected xattr_key dereference and hlist_add_head usage; run xfstest generic/069 against orangefs to verify no leak; check package versions match listed fixed releases.

Typical attack path

  1. Obtain local access to a system with orangefs mounted
  2. Execute setfattr/getfattr or equivalent xattr operations on files
  3. Trigger repeated getattr for cached attributes to induce leak or infinite walk
  4. Observe kernel oops, process hangs or OOM

How to detect it

Review kernel logs for oops or hung task messages involving orangefs xattr; inspect memory usage patterns during repeated getattr calls on security.capability; check for excessive kmalloc activity without corresponding frees in xattr cache paths.

What your security team should do

  • Prioritize kernel upgrades on any orangefs deployments within 30 days
  • Monitor for high CPU or memory usage tied to xattr operations
  • Audit extended attribute usage on orangefs filesystems
  • Verify ghostscript package versions on Ubuntu LTS systems match fixed releases

The record

In the Linux kernel, the following vulnerability has been resolved: orangefs: fix xattr related buffer overflow... Willy Tarreau <w@1wt.eu> forwarded me a message from Disclosure <disclosure@aisle.com> 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.

Affected packages

Ecosystem Package Introduced Fixed
Linux Kernel 0 5.4.302
Linux Kernel 4.6.0 5.4.302
Mageia:9 kernel 0 6.6.120-1.mga9
Mageia:9 kernel-linus 0 6.6.120-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.14-14.mga9
Mageia:9 kmod-xtables-addons 0 3.24-88.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_19 0 1-150600.13.3.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-64kb 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-docs 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-obs-build 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-source 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-syms 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-zfcpdump 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-docs 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-obs-build 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-source 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-syms 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.84.1

Related vulnerabilities