ZeroHour

CVE-2026-89957

niche

Stale crypto device access in Linux kernel s390 vfio-ap after AP adapter hot-unplug

CVSS 3.1
8.8 high
EPSS
Published
()
Modified
AI analysis

CVE-2026-89957 is a logic flaw in the Linux kernel's s390/vfio-ap driver, which passes IBM Z Adjunct Processor (AP) crypto hardware into KVM guests via mediated devices. The hot-unplug handler vfio_ap_mdev_hot_unplug_cfg() relied on the return value of bitmap_andnot(), which returns false when the resulting bitmap is empty; therefore, when the only adapter, domain, or control domain assigned to an mdev is removed from the host AP configuration, do_hotplug stays 0 and vfio_ap_mdev_update_guest_apcb() is never called. As a result, a running KVM guest retains stale hardware access to AP crypto devices that were unplugged or de-assigned from its authorized configuration, breaching the host/guest isolation boundary around cryptographic hardware and potentially key material. Only IBM Z / LinuxONE systems running Linux KVM with vfio-ap crypto passthrough are affected; the CVSS vector (AV:L/PR:L/S:C) indicates a low-privileged local attacker inside a guest, not remote compromise. No public proof-of-concept is known, the issue is not listed in CISA KEV, and no exploitation has been reported.

What to do: Apply the distribution kernel update containing the s390/vfio-ap fix (which replaces the bitmap_andnot() return-value check with bitmap_intersects() to force the guest APCB update) when available. Until patched, avoid hot-removing the last assigned AP adapter, domain, or control domain while vfio-ap guests are running—perform such reconfiguration with guests shut down or restart guests afterward to clear stale queue access. Confirm exposure by checking for vfio-ap mediated devices / CONFIG_VFIO_AP on s390x KVM hosts; x86 and other architectures are not affected.

Affected
Linux kernel, s390/vfio-ap driver (IBM Z AP crypto virtualization for KVM guests)
Estimated exposure
nicheon the order of a few thousand systems at most (only IBM Z/LinuxONE mainframe hosts running KVM guests with vfio-ap crypto passthrough) — vfio-ap exists solely on s390x IBM Z/LinuxONE hosts virtualizing Adjunct Processor crypto queues to KVM guests; the mainframe Linux installed base is small (thousands of machines globally) and only a fraction enable AP mediated-device…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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.

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

In the news

No ingested article mentions this CVE yet.