Skip to contentSkip to conversation

CVE-2026-99684: hwrng: virtio - prevent use-after-free after a failed restore

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

hwrng: virtio - prevent use-after-free after a failed restore

remove_common() frees the driver data during freeze, but does not clear vdev->priv, which points to freed memory. If probe_common() then fails during restore, a later remove or freeze can dereference the dangling pointer.

Clear vdev->priv on the probe_common() error cleanup path and before freeing the driver data in remove_common(). Also reset the device and return early from remove_common() if vdev->priv is already NULL for a safe teardown after a failed restore.

The Linux kernel CVE team has assigned CVE-2026-99684 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.16 with commit 08e53fbdb85c0f6f45c0f7c1ea3defc1752a95ce and fixed in 6.12.118 with commit ec81f97c6b13b839e5800cdade1e5b187b9b2738
	Issue introduced in 3.16 with commit 08e53fbdb85c0f6f45c0f7c1ea3defc1752a95ce and fixed in 6.18.64 with commit 42f2f4ee9d6e75b8b55b9108f6f5cf254425db64
	Issue introduced in 3.16 with commit 08e53fbdb85c0f6f45c0f7c1ea3defc1752a95ce and fixed in 7.3.5 with commit b18bda055c0d3e44fdf419e2739d92ea92a6f1d2
	Issue introduced in 3.16 with commit 08e53fbdb85c0f6f45c0f7c1ea3defc1752a95ce and fixed in 7.4-rc2 with commit 0f7bf47f5a0cc26320aa4b14f4504d03a07f4b74

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-99684

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/char/hw_random/virtio-rng.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/ec81f97c6b13b839e5800cdade1e5b187b9b2738
	https://git.kernel.org/stable/c/42f2f4ee9d6e75b8b55b9108f6f5cf254425db64
	https://git.kernel.org/stable/c/b18bda055c0d3e44fdf419e2739d92ea92a6f1d2
	https://git.kernel.org/stable/c/0f7bf47f5a0cc26320aa4b14f4504d03a07f4b74