CVE-2021-47646
📋 TL;DR
This CVE involves a use-after-free vulnerability in the Linux kernel's BFQ I/O scheduler that could lead to system crashes or potential privilege escalation. It affects Linux systems using the BFQ scheduler with specific configurations. The vulnerability was introduced by one commit, triggered by another, and fixed by a third commit.
💻 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 →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, potential privilege escalation to kernel mode, or system instability requiring reboot.
Likely Case
System crash or kernel panic when specific I/O operations occur with BFQ scheduler configurations.
If Mitigated
Minimal impact if BFQ scheduler is not in use or systems are properly patched.
🎯 Exploit Status
Requires local access and ability to trigger specific I/O operations with BFQ scheduler. No known public exploits.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel commit d29bd41428cf and subsequent commits that restore 2d52c58b9c9b
Vendor Advisory: https://git.kernel.org/stable/c/15729ff8143f8135b03988a100a19e66d7cb7ecd
Restart Required: Yes
Instructions:
1. Update to a patched kernel version from your distribution vendor. 2. For custom kernels, apply commits d29bd41428cf and 2d52c58b9c9b. 3. Reboot the system after kernel update.
🔧 Temporary Workarounds
Disable BFQ scheduler
linuxSwitch to a different I/O scheduler like CFQ or deadline
echo cfq > /sys/block/[device]/queue/scheduler
🧯 If You Can't Patch
- Disable BFQ scheduler on all block devices
- Restrict local user access to systems where patching isn't possible
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if BFQ scheduler is active: uname -r and check /sys/block/*/queue/scheduler
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is patched and test with stress I/O operations
📡 Detection & Monitoring
Log Indicators:
- Kernel panic messages in dmesg or system logs
- OOPs messages related to BFQ or block layer
Network Indicators:
- None - local vulnerability only
SIEM Query:
search 'kernel panic' OR 'Oops' OR 'BFQ' in system logs
🔗 References
- https://git.kernel.org/stable/c/15729ff8143f8135b03988a100a19e66d7cb7ecd
- https://git.kernel.org/stable/c/4083925bd6dc89216d156474a8076feec904e607
- https://git.kernel.org/stable/c/65d8a737452e88f251fe5d925371de6d606df613
- https://git.kernel.org/stable/c/931aff627469a75c77b9fd3823146d0575afffd6
- https://git.kernel.org/stable/c/abc2129e646af7b43025d90a071f83043f1ae76c
- https://git.kernel.org/stable/c/cc051f497eac9d8a0d816cd4bffa3415f2724871
- https://git.kernel.org/stable/c/f990f0985eda59d4f29fc83fcf300c92b1225d39