HIGH Introduced in 6.0
vfio-ap HotUnplug Bypass
CVE-2026-89957
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
KernelScan AI5.7MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: s390/vfio-ap: Fix hot-unplug skipped when last AP adapter or domain removed The vfio_ap_mdev_hot_unplug_cfg() function uses the return value of bitmap_andnot() to determine whether the guest APCB needs to be updated. However, bitmap_andnot() returns false when the resulting destination bitmap is empty. This means that if the only adapter, domain or control domain assigned to an mdev is removed from the host's AP configuration, the bit is correctly cleared from the shadow APCB, but bitmap_andnot() returns false because the result is an empty bitmap. Consequently, do_hotplug remains 0 and vfio_ap_mdev_update_guest_apcb() is never called, leaving the KVM guest with stale hardware access to the unplugged AP devices. Fix this by replacing the bitmap_andnot() return value check with bitmap_intersects() to determine whether the shadow APCB actually overlaps with the removal mask. If there is an intersection, call bitmap_andnot() solely for its side effect of clearing the bits, then unconditionally set do_hotplug to trigger the guest APCB update.
02KernelScan AI Analysis
Risk summary
On s390 systems using KVM with vfio-ap crypto adapter passthrough, removing the last assigned AP adapter or domain from the host configuration fails to revoke the guest's access to those devices. The guest retains stale hardware access to unplugged crypto adapters, potentially allowing continued unauthorized cryptographic operations after the host administrator intended to revoke them.
Vulnerability analysis
When the host administrator removes the last crypto adapter or domain assigned to a guest, the kernel routine that notifies guests about hardware changes mistakenly decides no update is needed. It treats an empty result as meaning nothing was removed, when in fact the final assigned item was removed. Consequently, the guest is never told to drop its access and continues using hardware that should have been revoked. The fix changes the logic to detect when any assigned device is being removed, and then always notifies the guest to update its access. This only affects s390 systems using KVM to pass through crypto adapters to guests, and only triggers when the host administrator removes the final assigned adapter or domain.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.6 | 6.0 | 6.6.157 | 3a9b049bbdc4 |
| 6.18 | 6.0 | 6.18.51 | c45753c32d45 |
| 7.2 | 6.0 | 7.2.5 | 04b35dd88c10 |
| 6.12 | 6.0 | 6.12.110 | 753aa3bb1273 |
| mainline | 6.0 | 7.3-rc1 | 917f509bfb88 |
| 6.1 | 6.0 | 6.1.188 | f58e824de857 |
| cip/6.12 | 6.0 | 6.12.111-cip32 | 753aa3bb1273 |