CVE-2025-21753

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's Btrfs filesystem allows an attacker to potentially crash the system or execute arbitrary code with kernel privileges. This affects Linux systems using Btrfs filesystem when concurrent transaction operations occur. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but references indicate fixes in stable kernel trees. Likely affects multiple kernel versions with Btrfs support.
Operating Systems: Linux distributions using Btrfs filesystem
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using Btrfs filesystem. Systems using other filesystems (ext4, XFS, etc.) are not vulnerable.

📦 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 →

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 →

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 →

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 →

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 →

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 →

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 →

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 arbitrary code execution with kernel privileges resulting in complete system compromise.

🟠

Likely Case

System crash or kernel panic causing denial of service, requiring system reboot.

🟢

If Mitigated

Limited impact if system has proper access controls preventing unprivileged users from triggering Btrfs operations.

🌐 Internet-Facing: LOW - Requires local access to exploit, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or processes with appropriate permissions could trigger the vulnerability, potentially causing system instability.

🎯 Exploit Status

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

Exploitation requires triggering specific race condition during transaction abort, which may be difficult to reliably achieve. Requires local access and appropriate permissions to perform Btrfs operations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel trees (6.13.0-rc7+). Check specific distribution backports.

Vendor Advisory: https://git.kernel.org/stable/c/6ba4663ada6c6315af23a6669d386146634808ec

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution's repositories. 2. For custom kernels, apply patches from kernel.org stable trees. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable Btrfs filesystem

all

Switch to alternative filesystem if Btrfs is not required

# Backup data and migrate to ext4 or XFS
# Not recommended for production systems without thorough testing

Restrict Btrfs operations

all

Limit user permissions for Btrfs operations to reduce attack surface

# Use SELinux/AppArmor policies to restrict Btrfs access
# Implement least privilege for users and services

🧯 If You Can't Patch

  • Implement strict access controls to limit who can perform Btrfs operations
  • Monitor system logs for kernel panics or Btrfs-related errors indicating potential exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if Btrfs is in use: 'uname -r' and 'cat /proc/filesystems | grep btrfs'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is updated to patched version and check for absence of KASAN reports related to transaction.c

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • KASAN use-after-free reports in dmesg
  • Btrfs transaction errors in system logs

Network Indicators:

  • None - local vulnerability only

SIEM Query:

Search for: 'KASAN: slab-use-after-free' OR 'BUG: KASAN' OR 'btrfs transaction' in kernel logs

🔗 References

📤 Share & Export