CVE-2024-56759

7.8 HIGH

📋 TL;DR

A use-after-free vulnerability in the Linux kernel's Btrfs filesystem occurs when Copy-On-Write (COW) operations on tree blocks are performed with tracing enabled and preemption active. This allows potential memory corruption that could lead to system crashes or privilege escalation. Systems running affected Linux kernel versions with Btrfs filesystem and preemption enabled are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but patches available in stable kernel trees
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Requires CONFIG_PREEMPT=y and Btrfs filesystem usage with trace_btrfs_cow_block tracepoint enabled

📦 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

Kernel panic, system crash, or potential privilege escalation leading to full system compromise.

🟠

Likely Case

System instability, crashes, or denial of service when Btrfs operations trigger the vulnerable code path.

🟢

If Mitigated

Minimal impact if systems don't use Btrfs or have preemption disabled.

🌐 Internet-Facing: LOW - Requires local access to trigger filesystem operations.
🏢 Internal Only: MEDIUM - Local users or processes could potentially exploit this to crash systems or escalate privileges.

🎯 Exploit Status

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

Requires local access and specific conditions (Btrfs operations with tracing enabled)

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patched in stable kernel versions via provided git commits

Vendor Advisory: https://git.kernel.org/stable/c/44f52bbe96dfdbe4aca3818a2534520082a07040

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version 2. Reboot system 3. Verify kernel version

🔧 Temporary Workarounds

Disable Btrfs tracing

Linux

Disable the trace_btrfs_cow_block tracepoint to prevent triggering the vulnerable code path

echo 0 > /sys/kernel/debug/tracing/events/btrfs/btrfs_cow_block/enable

Disable kernel preemption

Linux

Rebuild kernel with CONFIG_PREEMPT=n (not recommended for production systems)

🧯 If You Can't Patch

  • Avoid using Btrfs filesystem on affected systems
  • Implement strict access controls to limit who can perform filesystem operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and verify if Btrfs is in use with preemption enabled

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes one of the patched commits: 44f52bbe96dfdbe4aca3818a2534520082a07040 or other listed commits

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic logs
  • Btrfs error messages in dmesg
  • System crash reports

Network Indicators:

  • None - local vulnerability only

SIEM Query:

Search for kernel panic events or Btrfs filesystem errors in system logs

🔗 References

📤 Share & Export