CVE-2025-22121

7.1 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's ext4 filesystem driver that allows reading kernel memory beyond allocated bounds. It affects Linux systems using ext4 filesystems and can lead to kernel crashes or potential privilege escalation. The vulnerability occurs during extended attribute cleanup operations when deleting inodes.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific kernel versions with vulnerable ext4 code (check git commits for exact ranges)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using ext4 filesystem. Requires filesystem operations that trigger extended attribute cleanup.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash, or potential privilege escalation to root if combined with other vulnerabilities.

🟠

Likely Case

System instability, kernel crashes, or denial of service due to memory corruption.

🟢

If Mitigated

Limited to denial of service if proper kernel hardening and isolation are in place.

🌐 Internet-Facing: LOW - Requires local access or ability to trigger filesystem operations.
🏢 Internal Only: MEDIUM - Local users or processes with filesystem access could trigger the vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and ability to trigger specific filesystem operations. KASAN detection suggests it was found through fuzzing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commits 098927a13fd918bd7c64c2de905350a1ad7b4a3a or later

Vendor Advisory: https://git.kernel.org/stable/c/098927a13fd918bd7c64c2de905350a1ad7b4a3a

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable extended attributes on ext4

linux

Mount ext4 filesystems with 'no_user_xattr' option to disable extended attribute support

mount -o remount,no_user_xattr /mount/point

Use alternative filesystem

linux

Use XFS, Btrfs, or other filesystems instead of ext4 for critical partitions

🧯 If You Can't Patch

  • Restrict local user access to minimize attack surface
  • Implement strict SELinux/AppArmor policies to limit filesystem operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and verify if it includes the vulnerable ext4_xattr_inode_dec_ref_all() function without the fix

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes commit 098927a13fd918bd7c64c2de905350a1ad7b4a3a or check for xattr_check_inode() calls in ext4_iget_extra_inode()

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • KASAN reports mentioning ext4_xattr_inode_dec_ref_all
  • System crashes during filesystem operations

SIEM Query:

source="kernel" AND ("KASAN" OR "use-after-free" OR "ext4_xattr")

🔗 References

📤 Share & Export