CVE-2024-26944

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's Btrfs filesystem zoned mode implementation. It allows an attacker with local access to potentially crash the system or execute arbitrary code with kernel privileges. Systems using Btrfs with zoned mode enabled are affected.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution, but includes kernels around 6.8.0-rc5 and earlier with Btrfs zoned support)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when Btrfs filesystem is configured with zoned mode enabled and device replace operations are performed.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to denial of service, or potential privilege escalation to root via arbitrary code execution in kernel context.

🟠

Likely Case

System crash or kernel panic during device replace operations, causing temporary denial of service.

🟢

If Mitigated

No impact if zoned mode is disabled or device replace operations are not performed.

🌐 Internet-Facing: LOW - Requires local access to trigger via device replace operations.
🏢 Internal Only: MEDIUM - Local users or automated processes performing device operations could trigger the vulnerability.

🎯 Exploit Status

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

Requires local access and ability to trigger device replace operations on Btrfs zoned filesystems.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits 1ec17ef59168a1a6f1105f5dc517f783839a5302 and 34ca809e055eca5cfe63d9c7efbf80b7c21b4e57

Vendor Advisory: https://git.kernel.org/stable/c/1ec17ef59168a1a6f1105f5dc517f783839a5302

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Check your distribution's security advisories for specific patched kernel versions. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Disable Btrfs zoned mode

linux

Avoid using Btrfs zoned mode feature if not required

# Do not create Btrfs filesystems with zoned mode enabled
# Check existing filesystems: btrfs filesystem show

Avoid device replace operations

linux

Temporarily avoid performing device replace operations on Btrfs filesystems

# Monitor for device replace operations in logs
# Consider alternative data migration methods

🧯 If You Can't Patch

  • Disable Btrfs zoned mode on all filesystems
  • Implement strict access controls to prevent unauthorized users from performing device operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if Btrfs zoned mode is in use: uname -r and examine /proc/mounts for btrfs filesystems

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits: grep -q '1ec17ef59168a1a6f1105f5dc517f783839a5302\|34ca809e055eca5cfe63d9c7efbf80b7c21b4e57' /proc/version_signature

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages mentioning 'KASAN: slab-use-after-free in do_zone_finish'
  • Btrfs device replace operation logs followed by system crashes
  • dmesg output showing use-after-free in btrfs module

Network Indicators:

  • None - this is a local filesystem vulnerability

SIEM Query:

source="kernel" AND "KASAN: slab-use-after-free" AND "do_zone_finish"

🔗 References

📤 Share & Export