CVE-2022-49300
📋 TL;DR
A race condition in the Linux kernel's NBD (Network Block Device) driver allows concurrent module removal while nbd_alloc_config() is executing, potentially causing resource leaks and kernel oops (crashes). This affects Linux systems using the NBD module, primarily those with NBD devices configured. The vulnerability can lead to denial of service and system instability.
💻 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 →⚠️ Risk & Real-World Impact
Worst Case
Kernel panic or system crash leading to complete denial of service, potentially requiring physical intervention to reboot the system.
Likely Case
Resource leaks (memory, workqueues) and occasional kernel oops errors causing NBD device failures and service disruption.
If Mitigated
Minor performance impact or no noticeable effect if NBD module is not actively used or removed.
🎯 Exploit Status
Exploitation requires local access and ability to trigger NBD operations while removing the module.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in Linux kernel stable releases via commits referenced in CVE (e.g., 5.14+ with backports)
Vendor Advisory: https://git.kernel.org/stable/c/122e4adaff2439f1cc18cc7e931980fa7560df5c
Restart Required: Yes
Instructions:
1. Update Linux kernel to patched version from your distribution. 2. For custom kernels, apply commits: 122e4adaff2439f1cc18cc7e931980fa7560df5c and related fixes. 3. Reboot system to load new kernel.
🔧 Temporary Workarounds
Disable NBD module
linuxPrevent loading of the vulnerable NBD module if not needed
echo 'blacklist nbd' >> /etc/modprobe.d/blacklist-nbd.conf
rmmod nbd
Avoid module removal during NBD operations
linuxEnsure NBD module is not unloaded while NBD devices are active
# Monitor NBD usage and avoid 'rmmod nbd' when devices are mounted
🧯 If You Can't Patch
- Ensure NBD module is not loaded unless absolutely required
- Implement strict controls on who can load/unload kernel modules
🔍 How to Verify
Check if Vulnerable:
Check kernel version and if NBD module is loaded: uname -r && lsmod | grep nbd
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version is patched and test by attempting to reproduce race condition (not recommended in production)
📡 Detection & Monitoring
Log Indicators:
- Kernel oops messages mentioning nbd_read_stat
- System logs showing NBD module removal errors
- dmesg output with NULL pointer dereference at 0000000000000040
Network Indicators:
- N/A - This is a local kernel issue
SIEM Query:
source="kernel" AND ("nbd_read_stat" OR "NULL pointer dereference" AND "nbd")
🔗 References
- https://git.kernel.org/stable/c/122e4adaff2439f1cc18cc7e931980fa7560df5c
- https://git.kernel.org/stable/c/165cf2e0019fa6cedc75b456490c41494c34abb4
- https://git.kernel.org/stable/c/2573f2375b64280be977431701ed5d33b75b9ad0
- https://git.kernel.org/stable/c/2888fa41985f93ed0a6837cfbb06bcbfd7fa2314
- https://git.kernel.org/stable/c/71c142f910da44421213ade601bcbd23ceae19fa
- https://git.kernel.org/stable/c/8a7da4ced236ce6637fe70f14ca18e718d4bf9e9
- https://git.kernel.org/stable/c/c55b2b983b0fa012942c3eb16384b2b722caa810
- https://git.kernel.org/stable/c/d09525720dd5201756f698bee1076de9aefd4602