CVE-2026-97987: virtio_input: reset device if input_register_device() fails
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
virtio_input: reset device if input_register_device() fails
Probe marks the device DRIVER_OK with virtio_device_ready() before calling input_register_device(). If registration fails, the error path cleared vi->ready and called del_vqs() while the device was still live, so the device could keep DMA to queues that were already torn down.
Match remove/freeze: call virtio_reset_device() on that path before tearing down the virtqueues.
The Linux kernel CVE team has assigned CVE-2026-97987 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.1 with commit 271c865161c57cfabca45b93eaa712b19da365bc and fixed in 6.12.111 with commit 9a7e107734137f098f9b81e5615aa5a02c5395c7 Issue introduced in 4.1 with commit 271c865161c57cfabca45b93eaa712b19da365bc and fixed in 6.18.53 with commit 8407da8974326c1ffdfe6a5a9bfc8fed3212bbdf Issue introduced in 4.1 with commit 271c865161c57cfabca45b93eaa712b19da365bc and fixed in 7.2.7 with commit 668ebfea7ba623450b12fdeaa0d080464d0c0a14 Issue introduced in 4.1 with commit 271c865161c57cfabca45b93eaa712b19da365bc and fixed in 7.3-rc3 with commit 81489b32a21c9360f8750d1fb600155d27452e19
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-97987
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/virtio/virtio_input.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/9a7e107734137f098f9b81e5615aa5a02c5395c7 https://git.kernel.org/stable/c/8407da8974326c1ffdfe6a5a9bfc8fed3212bbdf https://git.kernel.org/stable/c/668ebfea7ba623450b12fdeaa0d080464d0c0a14 https://git.kernel.org/stable/c/81489b32a21c9360f8750d1fb600155d27452e19