CVE-2025-68366
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-68366 is a use-after-free vulnerability in the Linux kernel's NBD (Network Block Device) subsystem, specifically within the nbd_genl_connect function. It arises from a race condition between NBD_CMD_CONNECT and NBD_CLEAR_SOCK operations that can cause a reference count increment on a freed object. The vulnerability was published on December 24, 2025, and affects Linux kernel versions starting from 4.12 up to the patched releases (6.12.63, 6.17.13, 6.18.2, and 6.19-rc1). It carries a CVSS v3.1 base score of 5.5 (Medium) with HIGH availability impact (Microsoft MSRC, Feedly).

Technical details

The root cause is a time-of-check/time-of-use (TOCTOU) race condition (CWE-416: Use After Free) in nbd_genl_connect. After nbd_start_device increments config_refs to 2 and the config_lock mutex is released, a concurrent NBD_CLEAR_SOCK operation followed by closing the NBD device can decrement config_refs to 0, freeing the config object. The subsequent refcount_inc(&nbd->config_refs) in nbd_genl_connect then operates on freed memory, triggering a refcount_t: addition on 0; use-after-free kernel warning. The fix defers the config unlock in nbd_genl_connect to prevent the race window. Exploitation requires local access with low privileges and the ability to issue concurrent NBD netlink operations (Feedly).

Impact

Successful exploitation can cause kernel memory corruption leading to a denial of service (system crash or hang) due to the use-after-free condition in the NBD subsystem. In more severe scenarios, memory corruption could theoretically be leveraged for arbitrary kernel code execution, though this is considered difficult in practice. The vulnerability's availability impact is rated HIGH, with no direct confidentiality or integrity impact identified. Affected systems include those running vulnerable Linux kernel versions (introduced in 4.12) with the NBD subsystem enabled, including Microsoft Azure Linux 3 kernel packages azl3_kernel_6.6.117.1-1 and azl3_kernel_6.6.119.3-3 (Microsoft MSRC, Feedly).

Indicators of compromise

  • Logs: Kernel log entries containing refcount_t: addition on 0; use-after-free or WARNING: CPU: ... at lib/refcount.c:25 refcount_warn_saturate associated with nbd_genl_connect.
  • Logs: Kernel stack traces referencing nbd_genl_connect+0x16d0/0x1ab0, genl_family_rcv_msg_doit, or genl_rcv_msg in /var/log/kern.log or dmesg output.
  • Process: Unexpected system instability, kernel panics, or crashes on systems actively using NBD devices.
  • Network: Unusual or repeated NBD netlink (NETLINK_GENERIC) socket operations from low-privileged processes.

Mitigation and workarounds

Apply the available kernel patches addressing this vulnerability. Fixed versions include Linux kernel 6.12.63, 6.17.13, 6.18.2, and 6.19-rc1, with specific commits available in the Linux kernel stable branches (Feedly). Distribution-specific updates have been released by Debian (linux 6.1.162-1), Ubuntu (USN-8179-1/2/3/4, USN-8184-1, USN-8185-1/2, USN-8203-1, USN-8258-1, USN-8260-1, USN-8265-1), Red Hat (RHSA-2026:21209, RHSA-2026:21556, RHSA-2026:23329, RHSA-2026:23224), Amazon Linux 2 (ALAS2KERNEL-5.10-2026-113, ALAS2KERNEL-5.15-2026-098), and SUSE. As a workaround where patching is not immediately possible, restrict access to NBD device operations to trusted users only (e.g., via user namespace restrictions or removing the nbd kernel module if not required).

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-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 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