Cloudanix VulnDB

CVE-2025-22072

None

CVSS

—

EPSS

0.2%

Published

Apr 16, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A memory handling error in the Linux kernel could let a local user trigger crashes or leaks when working with certain specialized file system directories.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Privilege Gain
Component
OS kernel
Class
Use After Free
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Improper management of gang directory lifetimes in spufs causes unbalanced dput calls on open failure and failure to decrement link counts on root directory during gang destruction, resulting in use-after-free conditions or memory leaks.

Why it matters to the business

Systems running affected Linux kernels may experience crashes, resource leaks, or instability when using SPU file system features, potentially disrupting workloads on PowerPC hardware with Cell processors; low exploit likelihood reduces immediate urgency.

How an attack unfolds

An attacker with local access triggers creation of a gang directory followed by context creation that outlives the gang close operation, exploiting the missing counter protection and incorrect simple_rmdir cleanup to trigger use-after-free during dentry operations.

How to fix it

Update to Linux kernel commit 880e7b3da2e765c1f90c94c0539be039e96c7062 or later stable releases containing the revert plus counter-protected simple_recursive_removal logic; apply equivalent backports to distribution kernels.

How to confirm the fix worked

Confirm kernel source contains the counter initialization in gang creation, decrements in spufs_dir_close and spufs_gang_close, increment guard in spufs_create_context, and use of simple_recursive_removal on zero; test gang creation/destruction sequences for absence of leaks or unbalanced operations.

Typical attack path

  1. Obtain local unprivileged access on affected Linux kernel
  2. Create gang directory via spufs interface
  3. Create context belonging to the gang and keep it alive past gang close
  4. Trigger open failure path or destruction sequence to cause unbalanced dput or link count error
  5. Force use-after-free dereference during subsequent directory operations

How to detect it

Review kernel logs for dentry, rmdir, or spufs-related warnings around gang close operations; examine audit or syscall logs for unusual sequences of spu create/close calls; no public exploitation artifacts known.

What your security team should do

  • Prioritize kernel updates on any systems exposing spufs
  • Monitor for new stable releases containing the referenced commit
  • Restrict unprivileged access to spufs interfaces where possible until patched

The record

In the Linux kernel, the following vulnerability has been resolved: spufs: fix gang directory lifetimes prior to "[POWERPC] spufs: Fix gang destroy leaks" we used to have a problem with gang lifetimes - creation of a gang returns opened gang directory, which normally gets removed when that gets closed, but if somebody has created a context belonging to that gang and kept it alive until the gang got closed, removal failed and we ended up with a leak. Unfortunately, it had been fixed the wrong way. Dentry of gang directory was no longer pinned, and rmdir on close was gone. One problem was that failure of open kept calling simple_rmdir() as cleanup, which meant an unbalanced dput(). Another bug was in the success case - gang creation incremented link count on root directory, but that was no longer undone when gang got destroyed. Fix consists of * reverting the commit in question * adding a counter to gang, protected by ->i_rwsem of gang directory inode. * having it set to 1 at creation time, dropped in both spufs_dir_close() and spufs_gang_close() and bumped in spufs_create_context(), provided that it's not 0. * using simple_recursive_removal() to take the gang directory out when counter reaches zero.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux 0 No fix
Debian:11 linux-6.1 0 6.1.137-1~deb11u1
Debian:12 linux 0 No fix
Debian:13 linux 0 No fix
Debian:13 linux 0 6.12.25-1
Linux Kernel 2.6.22 6.1.134
Mageia:9 kernel 0 6.6.88-3.mga9
Mageia:9 kernel-linus 0 6.6.88-1.mga9
Mageia:9 kmod-virtualbox 0 7.0.24-70.mga9
Mageia:9 kmod-xtables-addons 0 3.24-78.mga9

Related vulnerabilities