CVE-2021-46981
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-46981 is a vulnerability in the Linux kernel's Network Block Device (NBD) subsystem. The issue involves a NULL pointer dereference in the flush_workqueue function when handling NBD device disconnection. This vulnerability was discovered when opening and disconnecting /dev/nbdX devices, where config_refs would be 1 but pointers in nbd_device remain null, leading to a reference to a null recv_workq (NVD).

Technical details

The vulnerability occurs in the nbd_disconnect_and_put function where flush_workqueue is called without checking if recv_workq is initialized. This results in a NULL pointer dereference when attempting to access address 0x20 in supervisor mode. The issue manifests as a kernel NULL pointer dereference with error code 0x0002, indicating a not-present page access in kernel mode. The vulnerability has been assigned a CVSS v3.1 base score of 5.5 (Medium) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

When exploited, this vulnerability can cause a kernel crash (denial of service) through a NULL pointer dereference. The issue affects the system's stability and availability, particularly when NBD devices are being disconnected. The vulnerability has been classified as CWE-476 (NULL Pointer Dereference) (NVD).

Exploitability

The vulnerability requires local access and can be triggered through the NBD device disconnection process. The exploit path involves opening /dev/nbdX first, where config_refs becomes 1 and pointers in nbd_device are still null, followed by disconnecting /dev/nbdX, which leads to referencing a null recv_workq (Kernel Patch).

Mitigation and workarounds

The fix involves adding a NULL pointer check (if (nbd->recv_workq)) before calling flush_workqueue in the nbd_disconnect_and_put function. This patch has been implemented across multiple kernel versions, including 5.4.x through 5.12.x. The fix was backported to various stable kernel branches to address the vulnerability (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-80904MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • linux-hwe-7.0
NoYesSep 04, 2026
CVE-2026-80905MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • linux-nvidia-7.0
NoYesSep 04, 2026
CVE-2026-80913MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-intel-iotg-5.15
NoYesSep 04, 2026
CVE-2026-80912MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-gcp-fips
NoYesSep 04, 2026
CVE-2026-80906NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-7.0
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management