KernelScan.io

HIGH Introduced in 6.0

vfio-ap HotUnplug Bypass

CVE-2026-89957

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

KernelScan AI5.7MEDIUM

01

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.

02

Engine v0.6.0

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.

Affecteddrivers/s390/crypto/vfio_ap_ops.c (s390 vfio-ap)

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.

03

BranchIntroducedFixed inPatch commit
6.66.06.6.1573a9b049bbdc4
6.186.06.18.51c45753c32d45
7.26.07.2.504b35dd88c10
6.126.06.12.110753aa3bb1273
mainline6.07.3-rc1917f509bfb88
6.16.06.1.188f58e824de857
cip/6.126.06.12.111-cip32753aa3bb1273