Skip to contentSkip to conversation

CVE-2026-98465: RISC-V: KVM: Serialize IMSIC attributes with vCPU migration

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

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

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

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

RISC-V: KVM: Serialize IMSIC attributes with vCPU migration

KVM device ioctls are not serialized against KVM_RUN. As a result, kvm_riscv_aia_imsic_rw_attr() can snapshot the physical CPU and HGEI of an IMSIC VS-file before a concurrent vCPU migration releases it.

The HGEI can then be allocated to another vCPU before imsic_vsfile_rw() uses the stale tuple. A GET or SET attribute may consequently access the new owner's interrupt file.

Serialize the entire IMSIC attribute operation with the target vCPU mutex. This prevents the VS-file from being migrated and recycled until the attribute access completes. Acquire the mutex killably so that the device ioctl remains interruptible while waiting for KVM_RUN to finish.

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

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

	Issue introduced in 6.5 with commit db8b7e97d6137a28b2bfc07e591d54da268f0c36 and fixed in 6.12.112 with commit a29c5d2dd2ef9a8617a9a6d5585696d5f149cd98
	Issue introduced in 6.5 with commit db8b7e97d6137a28b2bfc07e591d54da268f0c36 and fixed in 6.18.55 with commit c525772c304c971b0d3a1f2898dedbae653efe90
	Issue introduced in 6.5 with commit db8b7e97d6137a28b2bfc07e591d54da268f0c36 and fixed in 7.2.9 with commit 71acbea44e78665ea90e3c310fca6bbdcc0252db
	Issue introduced in 6.5 with commit db8b7e97d6137a28b2bfc07e591d54da268f0c36 and fixed in 7.3-rc5 with commit 8ae12ccaec6ec74945d8c1ef39f2c1b8df779abc

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

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:
arch/riscv/kvm/aia_imsic.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/a29c5d2dd2ef9a8617a9a6d5585696d5f149cd98
	https://git.kernel.org/stable/c/c525772c304c971b0d3a1f2898dedbae653efe90
	https://git.kernel.org/stable/c/71acbea44e78665ea90e3c310fca6bbdcc0252db
	https://git.kernel.org/stable/c/8ae12ccaec6ec74945d8c1ef39f2c1b8df779abc