CVE-2024-46733

5.5 MEDIUM

📋 TL;DR

This CVE describes a qgroup reservation leak vulnerability in the Linux kernel's Btrfs filesystem. When buffered write operations fail before creating ordered extents, the system fails to properly free reserved qgroup space, leading to resource exhaustion and potential filesystem corruption. This affects Linux systems using Btrfs with qgroups enabled.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with the vulnerable Btrfs code (specific versions not provided in CVE, but patches available for stable branches)
Operating Systems: Linux distributions using Btrfs filesystem
Default Config Vulnerable: ✅ No
Notes: Only affects systems using Btrfs filesystem with qgroups feature enabled. Most default Linux installations do not use Btrfs or have qgroups disabled by default.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Filesystem corruption leading to data loss, system crashes during unmount, and potential denial of service requiring filesystem repair or restoration from backups.

🟠

Likely Case

Filesystem warnings during unmount, qgroup accounting errors, and potential system instability when performing I/O operations on Btrfs volumes with qgroups enabled.

🟢

If Mitigated

Minor performance impact from qgroup accounting errors, but no data loss or system instability if proper monitoring is in place.

🌐 Internet-Facing: LOW - This vulnerability requires local filesystem access and specific Btrfs configurations to trigger.
🏢 Internal Only: MEDIUM - Internal systems using Btrfs with qgroups for storage management could experience filesystem corruption affecting critical services.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH

Exploitation requires triggering specific I/O error conditions in Btrfs write paths, making it difficult to weaponize. The vulnerability was discovered through fstest generic/475 testing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches available in stable kernel branches via git commits: 159f0f61b283ea71e827dd0c18c5dce197de1fa2, 30479f31d44d47ed00ae0c7453d9b253537005b2, 84464db2ec2a55b9313d5f264da196a37ec80994, e42ef22bc10f0309c0c65d8d6ca8b4127a674b7f

Vendor Advisory: https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution. 2. For custom kernels, apply the relevant git commits. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable Btrfs qgroups

linux

Disable qgroup feature on Btrfs filesystems to prevent the vulnerability from being triggered

btrfs quota disable /mount/point

Use alternative filesystem

linux

Migrate data to ext4, xfs, or other filesystems not affected by this vulnerability

🧯 If You Can't Patch

  • Monitor system logs for BTRFS warnings about qgroup reserved space leaks
  • Implement regular filesystem checks and backups to mitigate potential data corruption

🔍 How to Verify

Check if Vulnerable:

Check if using Btrfs with qgroups enabled: 'btrfs quota show /mount/point' and verify kernel version is unpatched

Check Version:

uname -r

Verify Fix Applied:

Check kernel version includes the fix commits or run fstest generic/475 to verify no qgroup leaks occur

📡 Detection & Monitoring

Log Indicators:

  • BTRFS warning: qgroup has unreleased space
  • BTRFS error: qgroup reserved space leaked
  • WARNING at close_ctree in kernel logs

SIEM Query:

source="kernel" AND ("qgroup has unreleased space" OR "qgroup reserved space leaked")

🔗 References

📤 Share & Export