HIGH Introduced in 6.5
kvm IMSIC Race
CVE-2026-98465
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H
KernelScan AI7.1HIGH
01Description
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.
02KernelScan AI Analysis
Risk summary
A local attacker with access to /dev/kvm on a RISC-V host running KVM with AIA IMSIC support can exploit a race condition between IMSIC attribute ioctls and vCPU migration to access another vCPU's interrupt file, potentially leading to VM escape, information disclosure, or kernel memory corruption.
Vulnerability analysis
The KVM device ioctl for reading or writing IMSIC attributes snapshots the physical CPU and HGEI (Hypervisor Guest External Interrupt) of a virtual interrupt file without holding the vCPU mutex. A concurrent vCPU migration can release and reallocate that HGEI to a different vCPU before the attribute operation uses the stale values, causing the GET or SET to target the new owner's interrupt state. The fix acquires the target vCPU's mutex for the entire attribute operation, serializing it against migration and preventing the VS-file from being recycled until the access completes. The mutex is taken killably so the ioctl remains interruptible. An attacker must be a local user with permission to open /dev/kvm and issue KVM device ioctls — typically a member of the kvm group or a process with CAP_SYS_ADMIN — on a RISC-V system where the AIA IMSIC virtualization feature is enabled and in use.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.5 | 6.12.112 | a29c5d2dd2ef |
| 6.18 | 6.5 | 6.18.55 | c525772c304c |
| 6.6 | 6.5 | 6.6.160 | 6c2bcf6b173d |
| 7.2 | 6.5 | 7.2.9 | 71acbea44e78 |
| mainline | 6.5 | 7.3 | 8ae12ccaec6e |
| cip/6.12 | 6.5 | 6.12.112-cip33 | a29c5d2dd2ef |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.112-cip33 |