CVE-2026-97996
kernel: virtio: fix use-after-free in unregister_virtio_device()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 25, 2026
Updated · October 18, 2026
Description
A flaw was found in the Linux kernel's virtio subsystem. A local user can trigger a use-after-free condition when unbinding or removing certain virtual I/O (virtio) devices. This issue occurs because the device memory is freed before its debug filesystem entries are removed, resulting in an invalid read operation. Exploitation of this flaw could allow a local attacker to crash the system, leading to a Denial of Service (DoS), or potentially execute arbitrary code.
Statement
A moderate-impact use-after-free flaw was found in the Linux kernel's virtio subsystem, affecting Red Hat Enterprise Linux 10 and Red Hat In-Vehicle OS 2. When a virtio device using one of the virtio_mmio, virtio_vdpa, virtio_uml, mlxbf-tmfifo, or virtio_ccw transports is unbound or removed, the transport's release callback can free the memory holding the embedded struct virtio_device before its debugfs entries are removed, so unregister_virtio_device() then reads dev->debugfs_dir from the freed object. A local attacker with the privileges needed to unbind or remove virtio devices (for example via sysfs) could use this flaw to crash the kernel, resulting in a denial of service, or potentially execute arbitrary code; Red Hat rated the flaw Moderate severity. The fix for the affected Red Hat Enterprise Linux 10 and Red Hat In-Vehicle OS 2 streams is currently deferred to a future update. The residual risk is considered limited because triggering the flaw requires local privileged access and one of the affected virtio transports, and the demonstrated impact is a denial of service. virtio_pci devices are not affected because that transport holds an extra device reference during removal. Earlier Red Hat Enterprise Linux versions (6, 7, 8, and 9) and the OpenShift Container Platform RHEL CoreOS images are not affected because the vulnerable code is not present in those products.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-825 · Expired Pointer Dereference