CVE-2022-49300

4.7 MEDIUM

📋 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

Products:
  • Linux kernel
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution, but generally before kernel 5.14+ with backports)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if the NBD module is loaded and being used. Many systems don't use NBD by default.

📦 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.

🌐 Internet-Facing: LOW - NBD is typically used internally for storage access, not directly exposed to the internet.
🏢 Internal Only: MEDIUM - Systems using NBD for storage or virtualization could experience service disruption if the module is removed while in use.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: HIGH - Requires precise timing and kernel module manipulation

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

linux

Prevent 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

linux

Ensure 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

📤 Share & Export