CVE-2022-50506

5.5 MEDIUM

📋 TL;DR

This CVE describes a null pointer dereference vulnerability in the Linux kernel's DRBD (Distributed Replicated Block Device) subsystem. When a DRBD device is configured as diskless (without backing storage), the kernel attempts to access a null pointer while cloning a bio structure, causing a kernel panic and system crash. This affects Linux systems using DRBD in diskless configurations.

💻 Affected Systems

Products:
  • Linux kernel with DRBD module
Versions: Linux kernel versions with the vulnerable DRBD commit c347a787e34cb up to the fix commits
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when DRBD is configured in diskless mode (without backing storage device). Standard DRBD configurations with backing devices are not affected.

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system crash and denial of service through kernel panic, requiring physical or remote console access to reboot the system.

🟠

Likely Case

System crash and denial of service when DRBD diskless operations are triggered, affecting availability of services running on the affected system.

🟢

If Mitigated

No impact if DRBD is not used or if diskless configurations are avoided.

🌐 Internet-Facing: LOW - Requires local access or specific DRBD operations to trigger, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Could be triggered by legitimate DRBD operations or malicious local users in environments using diskless DRBD configurations.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires triggering DRBD operations in diskless mode, which typically requires local access or specific application behavior. No known public exploits exist.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits 05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf and 6d42ddf7f27b6723549ee6d4c8b1b418b59bf6b5

Vendor Advisory: https://git.kernel.org/stable/c/05580a3bbf3cec677cb00a85dfeb21d6a9b48eaf

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. For distributions: Use package manager to update kernel package. 3. Reboot system to load patched kernel.

🔧 Temporary Workarounds

Avoid diskless DRBD configurations

linux

Configure DRBD with proper backing storage devices instead of diskless mode

# Edit DRBD configuration to use backing devices
# Example: drbdsetup /dev/drbd0 disk /dev/sdb1 /dev/sdc1

Unload DRBD module

linux

Remove DRBD kernel module if not required

sudo modprobe -r drbd

🧯 If You Can't Patch

  • Avoid using DRBD in diskless configurations
  • Implement strict access controls to prevent unauthorized users from triggering DRBD operations

🔍 How to Verify

Check if Vulnerable:

Check if DRBD is loaded and configured in diskless mode: lsmod | grep drbd and check DRBD configuration files for diskless settings

Check Version:

uname -r

Verify Fix Applied:

Check kernel version includes fix commits: uname -r and verify with distribution's security advisories

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/messages or dmesg
  • DRBD error logs related to null pointer dereference
  • System crash/reboot logs

Network Indicators:

  • Unusual DRBD network traffic patterns if exploited

SIEM Query:

source="kernel" AND "NULL pointer dereference" AND "drbd" OR source="drbd" AND "panic"

🔗 References

📤 Share & Export