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

CVE-2026-97987: Linux Kernel Privilege Escalation Vulnerability

CVE-2026-97987 is a privilege escalation flaw in the Linux kernel virtio_input driver that could allow attackers to gain elevated privileges. This post explains its technical details, affected versions, and mitigation steps.

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-97987 Overview

CVE-2026-97987 affects the Linux kernel's virtio_input driver. The driver marked the device as DRIVER_OK through virtio_device_ready() before calling input_register_device(). When registration failed, the error path cleared vi->ready and called del_vqs() while the device remained live. The device could continue issuing Direct Memory Access (DMA) operations to virtqueues that were already torn down. The upstream fix adds a virtio_reset_device() call on the error path, matching the behavior used in the remove and freeze handlers.

Critical Impact

A failed probe path in virtio_input can leave a virtio device performing DMA to released virtqueues, risking memory corruption and kernel instability on affected Linux systems.

Affected Products

  • Linux kernel builds including the virtio_input driver prior to the fix
  • Virtualized guests exposing virtio input devices (keyboard, mouse, tablet)
  • Stable kernel branches referenced in the upstream commits

Discovery Timeline

  • 2026-09-25 - CVE-2026-97987 published to the National Vulnerability Database (NVD)
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97987

Vulnerability Analysis

The virtio_input driver initializes a virtio input device during probe. It calls virtio_device_ready() to transition the device into the DRIVER_OK state before registering the input device with the kernel input subsystem. This ordering lets the device begin processing virtqueue descriptors immediately.

If input_register_device() fails, the probe error path clears vi->ready and invokes del_vqs() to free the virtqueues. The device, however, was never reset. From the hypervisor or device side, the device still believes the driver is ready and may continue DMA writes targeting queues that no longer exist in the guest kernel. This creates a classic use-after-free style window at the DMA layer.

The fix aligns the error path with the remove and freeze handlers by calling virtio_reset_device() before tearing down the virtqueues. The reset forces the device out of DRIVER_OK, stopping further DMA before memory is released.

Root Cause

The root cause is incorrect ordering of device state transitions during error handling. The driver signals readiness to the backend before all guest-side resources are safely registered, and the cleanup path omits the reset needed to revoke that readiness.

Attack Vector

Triggering the condition requires input_register_device() to fail during probe. An attacker positioned to influence probe failure, or a malicious or buggy backend, could race the window to issue DMA against freed virtqueue memory. The resulting memory corruption may cause denial of service or facilitate further exploitation inside the guest kernel.

No verified exploitation code is available. Refer to the upstream commits 668ebfe, 81489b3, 8407da8, and 9a7e107 for the exact code change.

Detection Methods for CVE-2026-97987

Indicators of Compromise

  • Kernel log entries showing virtio_input probe failures followed by DMA faults or Input/Output Memory Management Unit (IOMMU) errors.
  • Guest kernel oops or panic traces referencing virtqueue structures after a failed input_register_device() call.
  • Unexpected virtio input device disappearance accompanied by memory corruption warnings.

Detection Strategies

  • Compare running kernel versions against the fixed commits listed in the upstream stable tree.
  • Audit dmesg for the string virtio_input combined with register failures or subsequent DMA-related errors.
  • Correlate guest VM crash telemetry with host-side virtio backend events to identify repeated probe failures.

Monitoring Recommendations

  • Collect kernel ring buffer logs from Linux guests into a central Security Information and Event Management (SIEM) pipeline for cross-fleet pattern detection.
  • Alert on repeated virtio device probe failures across the virtualized fleet, which may indicate exploitation attempts or faulty backends.
  • Track kernel package versions through configuration management to confirm patch deployment coverage.

How to Mitigate CVE-2026-97987

Immediate Actions Required

  • Update affected Linux kernels to a stable release containing commits 668ebfe, 81489b3, 8407da8, or 9a7e107.
  • Prioritize patching for virtualized workloads that expose virtio input devices to untrusted or shared hypervisor backends.
  • Reboot guest systems after kernel upgrade so the fixed virtio_input driver is loaded.

Patch Information

The fix was committed to the upstream Linux kernel stable tree. Review the following references: Kernel Git Commit 668ebfe, Kernel Git Commit 81489b3, Kernel Git Commit 8407da8, and Kernel Git Commit 9a7e107. Distribution vendors typically backport these patches to their long-term support kernels.

Workarounds

  • Disable or unload the virtio_input driver on guests where virtio input devices are not required, using rmmod virtio_input or module blacklisting.
  • Avoid exposing virtio input devices to guests that do not need keyboard or pointer input, reducing the attack surface at the hypervisor configuration level.
  • Restrict guest kernel module loading to limit the chance that virtio_input probes under adversarial conditions.
bash
# Blacklist the virtio_input module until the patched kernel is deployed
echo 'blacklist virtio_input' | sudo tee /etc/modprobe.d/blacklist-virtio-input.conf
sudo update-initramfs -u
sudo reboot

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.