CVE-2024-56759
📋 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
- Linux kernel
📦 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.
🎯 Exploit Status
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
LinuxDisable 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
LinuxRebuild 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
- https://git.kernel.org/stable/c/44f52bbe96dfdbe4aca3818a2534520082a07040
- https://git.kernel.org/stable/c/526ff5b27f090fb15040471f892cd2c9899ce314
- https://git.kernel.org/stable/c/66376f1a73cba57fd0af2631d7888605b738e499
- https://git.kernel.org/stable/c/9a466b8693b9add05de99af00c7bdff8259ecf19
- https://git.kernel.org/stable/c/ba5120a2fb5f23b4d39d302e181aa5d4e28a90d1
- https://git.kernel.org/stable/c/c3a403d8ce36f5a809a492581de5ad17843e4701
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html