Skip to main content
Vulnerability Database/CVE-2026-98606

CVE-2026-98606: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98606 is a use-after-free vulnerability in the Linux kernel's DRM virtio driver that can lead to memory corruption. This article covers the technical details, affected versions, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98606 Overview

CVE-2026-98606 is a use-after-free vulnerability in the Linux kernel's drm/virtio driver. The flaw resides in virtio_gpu_vram_create(), which frees a GPU VRAM object with a bare kfree(vram) on error paths after drm_gem_private_object_init() has already run. On the second error path, drm_gem_create_mmap_offset() has already linked obj->vma_node into the device's VMA offset manager. The freed object remains in that interval tree, causing later lookups or insertions to walk freed memory. The dma_resv and gpuva locks are also never destroyed, leaving kernel data structures in an inconsistent state.

Critical Impact

A local unprivileged process interacting with the virtio-gpu device can trigger freed memory to remain referenced by the kernel's VMA offset manager, enabling potential kernel memory corruption or privilege escalation on virtualized Linux guests.

Affected Products

  • Linux kernel versions containing the drm/virtio driver with the vulnerable virtio_gpu_vram_create() implementation
  • Linux guest systems using virtio-gpu paravirtualized graphics
  • Stable kernel branches patched via the referenced upstream commits

Discovery Timeline

  • 2026-10-18 - CVE-2026-98606 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98606

Vulnerability Analysis

The vulnerability is a use-after-free [CWE-416] in the virtio GPU driver's VRAM object creation routine. When virtio_gpu_vram_create() encounters an error, it calls kfree(vram) directly to release the allocation. However, by the time the error paths are reached, drm_gem_private_object_init() has already initialized the embedded GEM object, including the dma_resv reservation object and GPU virtual address (gpuva) lock. On the second error path, drm_gem_create_mmap_offset() has additionally inserted obj->vma_node into the DRM device's VMA offset manager interval tree. Freeing the object without calling drm_gem_object_release() leaves a dangling node inside that tree. Subsequent lookups or insertions dereference freed memory, and the uninitialized teardown of synchronization primitives leaves kernel state corrupted.

Root Cause

The root cause is incomplete object teardown on failure paths. The code assumes a plain kfree() reverses allocation, but the GEM object has already been registered with multiple kernel subsystems. The correct sequence requires calling drm_gem_object_release() to unlink the VMA node, destroy the dma_resv lock, and release the gpuva lock before the backing memory is freed. The fix adds drm_gem_object_release() before each kfree(vram) call on both error paths.

Attack Vector

Exploitation requires local access to a system exposing /dev/dri/renderD* or /dev/dri/card* for the virtio-gpu device, typically in a Linux virtual machine guest. An attacker triggers the error path in virtio_gpu_vram_create() through crafted ioctl parameters that cause allocation or initialization failures after the VMA node has been registered. Subsequent operations that walk the VMA offset tree then access freed memory. See the upstream fix in the Kernel Git Commit Patch for the exact code change.

// No verified exploit code is available for this vulnerability.
// Refer to the upstream commits for the patched code paths.

Detection Methods for CVE-2026-98606

Indicators of Compromise

  • Kernel panic or oops messages referencing drm_vma_offset_manager, drm_gem, or virtio_gpu_vram_create in dmesg and /var/log/kern.log
  • KASAN (Kernel Address Sanitizer) use-after-free reports naming virtio_gpu_vram_create or GEM VMA node operations
  • Unexpected process crashes or kernel warnings in Linux guests using virtio-gpu after ioctl calls on DRM render nodes

Detection Strategies

  • Enable KASAN on test and staging kernels to surface use-after-free conditions during fuzzing of DRM ioctl interfaces
  • Monitor kernel ring buffer output for BUG:, WARNING:, or general protection fault entries originating in drm/virtio code paths
  • Audit installed kernel package versions against the fixed commits listed in the upstream stable tree

Monitoring Recommendations

  • Collect dmesg and journald kernel logs centrally from Linux virtual machines to identify repeated DRM-related faults
  • Track access patterns to /dev/dri/* nodes from unprivileged users and containers to detect anomalous activity
  • Alert on kernel crash dumps generated by kdump or systemd-coredump that reference virtio-gpu symbols

How to Mitigate CVE-2026-98606

Immediate Actions Required

  • Apply the stable kernel update containing the referenced upstream commits to all affected Linux guest systems
  • Reboot virtual machines after kernel package upgrades to activate the patched code
  • Restrict access to /dev/dri/* device nodes to trusted users and groups where virtio-gpu is not actively required

Patch Information

The fix adds drm_gem_object_release() before kfree(vram) on both error paths in virtio_gpu_vram_create(). Patched commits are available in the upstream Linux stable tree, including Kernel Git Commit Patch, Kernel Git Commit Fix, Kernel Git Commit Update, Kernel Git Commit Enhancement, Kernel Git Commit Modification, Kernel Git Commit Refactor, and Kernel Git Commit Change. Consume the fix through your Linux distribution's security update channel.

Workarounds

  • Disable the virtio-gpu driver on guests that do not require accelerated graphics by blacklisting the virtio_gpu kernel module
  • Remove or restrict permissions on /dev/dri/renderD* and /dev/dri/card* to prevent unprivileged ioctl access
  • Avoid exposing DRM render nodes to untrusted containers or user sessions until the kernel is patched
bash
# Blacklist the virtio_gpu module on guests that do not need it
echo "blacklist virtio_gpu" | sudo tee /etc/modprobe.d/blacklist-virtio-gpu.conf
sudo update-initramfs -u

# Restrict DRM device node access to the video group only
sudo chown root:video /dev/dri/renderD128 /dev/dri/card0
sudo chmod 0660 /dev/dri/renderD128 /dev/dri/card0

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.