RISC-V: KVM: Serialize IMSIC attributes with vCPU migration
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
In Linux RISC-V KVM, an IMSIC attribute ioctl can race with vCPU migration. If the interrupt file is reassigned during the race, a GET or SET attribute operation may access another vCPU’s interrupt file. The input does not specify network exposure, authentication requirements, or user interaction.
Operators running Linux kernels with RISC-V KVM IMSIC support should check their kernel version against the vendor advisory.