CVE-2022-49912
📋 TL;DR
This CVE describes a memory leak vulnerability in the Linux kernel's Btrfs filesystem qgroup self-tests. When certain error conditions occur during qgroup testing, the kernel fails to properly free allocated memory (ulists), leading to resource exhaustion over time. This affects Linux systems using Btrfs filesystem with qgroup functionality enabled.
💻 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 →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
Sustained exploitation could lead to kernel memory exhaustion, causing system instability, denial of service, or potential kernel panic/crash.
Likely Case
Gradual memory leak during qgroup self-tests, potentially causing performance degradation or system instability if tests are run repeatedly.
If Mitigated
Minimal impact as this only affects qgroup self-tests which are typically not run in production environments.
🎯 Exploit Status
Exploitation requires privileged access to trigger qgroup self-tests. Memory leak occurs only during specific error conditions in test functions.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Kernel versions containing fixes from git commits: 0a0dead4ad1a2e2a9bdf133ef45111d7c8daef84, 203204798831c35d855ecc6417d98267d2d2184b, 3f58283d83a588ff5da62fc150de19e798ed2ec2, 5d1a47ebf84540e40b5b43fc21aef0d6c0f627d9, d37de92b38932d40e4a251e876cc388f9aee5f42
Vendor Advisory: https://git.kernel.org/stable/c/
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution vendor. 2. Reboot system to load new kernel. 3. Verify kernel version after reboot.
🔧 Temporary Workarounds
Disable qgroup self-tests
linuxPrevent execution of vulnerable qgroup self-test functions
# Ensure qgroup self-tests are not executed in production
🧯 If You Can't Patch
- Avoid running Btrfs qgroup self-tests in production environments
- Monitor system memory usage and restart if memory exhaustion is detected
🔍 How to Verify
Check if Vulnerable:
Check kernel version and compare with patched versions from git commits. Vulnerable if running kernel with vulnerable Btrfs qgroup self-test code.
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version after update matches patched versions. Check that ulist_free() calls are present in test_no_shared_qgroup() and test_multiple_refs() functions.
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages
- Memory allocation failures in kernel logs
- System instability after qgroup operations
Network Indicators:
- None - local vulnerability only
SIEM Query:
Search for kernel panic logs, memory allocation failures, or Btrfs qgroup test execution
🔗 References
- https://git.kernel.org/stable/c/0a0dead4ad1a2e2a9bdf133ef45111d7c8daef84
- https://git.kernel.org/stable/c/203204798831c35d855ecc6417d98267d2d2184b
- https://git.kernel.org/stable/c/3f58283d83a588ff5da62fc150de19e798ed2ec2
- https://git.kernel.org/stable/c/5d1a47ebf84540e40b5b43fc21aef0d6c0f627d9
- https://git.kernel.org/stable/c/d37de92b38932d40e4a251e876cc388f9aee5f42
- https://git.kernel.org/stable/c/d81370396025cf63a7a1b5f8bb25a3479203b2ca
- https://git.kernel.org/stable/c/da7003434bcab0ae9aba3f2c003e734cae093326
- https://git.kernel.org/stable/c/f46ea5fa3320dca4fe0c0926b49a5f14cb85de62