CVE-2022-50058

5.5 MEDIUM

📋 TL;DR

A NULL pointer dereference vulnerability in the Linux kernel's vdpa_sim_blk driver causes kernel panic when creating virtual block devices. This affects systems using vDPA (vhost Data Path Acceleration) simulation with uninitialized memory structures. The vulnerability leads to denial of service but not arbitrary code execution.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions between commit bda324fd037a and fix commits 19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809/a291c7d289fac2cb13fb2614a9a251afbbd86ce9
Operating Systems: Linux distributions with affected kernel versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when vDPA simulation is enabled and vdpa_sim_blk module is loaded/used.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

Kernel panic leading to system crash and denial of service, requiring physical or remote console access to reboot.

🟠

Likely Case

System crash when attempting to create vdpa_sim_blk devices, disrupting virtual device functionality.

🟢

If Mitigated

No impact if vDPA simulation is not used or the vulnerable code path is not triggered.

🌐 Internet-Facing: LOW - Requires local access or specific virtualization configurations to trigger.
🏢 Internal Only: MEDIUM - Can be triggered by privileged users or automated management tools creating vDPA devices.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ✅ No
Complexity: LOW - Simple command execution triggers the bug.

Exploitation requires ability to run 'vdpa dev add' command with appropriate privileges.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commits 19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809 or a291c7d289fac2cb13fb2614a9a251afbbd86ce9

Vendor Advisory: https://git.kernel.org/stable/c/19cd4a5471b8eaa4bd161b0fdb4567f2fc88d809

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Reboot system. 3. Verify kernel version with 'uname -r'.

🔧 Temporary Workarounds

Disable vdpa_sim_blk module

linux

Prevent loading of vulnerable kernel module

echo 'blacklist vdpa_sim_blk' >> /etc/modprobe.d/blacklist-vdpa.conf
rmmod vdpa_sim_blk

Restrict vdpa command access

linux

Limit who can execute vdpa management commands

chmod 750 /usr/sbin/vdpa
setfacl -m u:root:rwx /usr/sbin/vdpa

🧯 If You Can't Patch

  • Avoid creating vdpa_sim_blk devices with 'vdpa dev add' commands.
  • Implement strict access controls to prevent unauthorized users from executing vdpa management commands.

🔍 How to Verify

Check if Vulnerable:

Check if kernel is affected by examining version or attempting: 'vdpa dev add mgmtdev vdpasim_blk name test' (may crash system).

Check Version:

uname -r

Verify Fix Applied:

After patching, verify kernel version and test vdpa device creation: 'vdpa dev add mgmtdev vdpasim_blk name test' should succeed without panic.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/kern.log or dmesg
  • NULL pointer dereference errors at address 0000000000000030
  • vhost_iotlb_add_range_ctx stack traces

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "BUG: kernel" OR "vdpa_sim_blk" OR "vhost_iotlb_add_range")

🔗 References

📤 Share & Export