CVE-2026-89959 PUBLISHED

s390/vfio-ap: Fix control domain removal in vfio_ap_mdev_cfg_remove

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

s390/vfio-ap: Fix control domain removal in vfio_ap_mdev_cfg_remove

The vfio_ap_config_remove function uses the bitmap_andnot function to clear bits from the matrix_mdev->matrix.adm bitmap (specifies the control domains assigned to the mdev). This prevents the explicitly unplugged control domains from being removed the KVM guest. The bitmap_and function is used instead.

Metrics

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

AV:L - The bug is reached when the host AP bus scan (ap_scan_bus → vfio_ap_on_cfg_changed → vfio_ap_mdev_cfg_remove) fails to clear control-domain bits from a KVM guest CRYCB; that is a local s390 vfio-ap/KVM path with no network, Bluetooth, or USB exposure. AC:L - bitmap_andnot(cdrem, cd_remove, matrix.adm) always yields removed domains that are not assigned to the mdev, so assigned control domains are never unplugged. After QCI drops a domain assigned to the mdev, leftover guest ADM bits persist deterministically with no race or uncontrolled memory layout. PR:L - Leftover ADM bits are consumed by the tenant KVM guest (or an unprivileged kvm-group QEMU process holding a delegated vfio-ap mdev) via millicode-enforced AP instructions with no host capability check. Creating the mdev is admin setup; exploiting the failed unplug does not require init-namespace root. UI:N - After the host AP configuration change, vfio_ap_mdev_cfg_remove runs from the AP bus workqueue with no further victim action, and the guest itself issues NQAP/PQAP against the stale control domains. No mount, click, or other user interaction is required. S:C - Leftover ADM bits in the guest CRYCB grant millicode-enforced rights to modify AP control domains the host intended to revoke, crossing the vfio-ap/KVM passthrough isolation boundary into the host or another consumer's crypto-domain authority, including nested guests whose shadow APCB is ANDed with the stale L1 mask. C:H - Control domains authorize AP commands that operate on other domains' key material (for example setting a secure private key). Stale ADM bits let the guest keep targeting those domains through remaining usage-domain queues, disclosing or wrapping keys that should belong to host zcrypt or another guest. I:H - With leftover control-domain access the guest can still submit AP command-request messages that change master keys and other domain state for domains removed from the host AP configuration, corrupting crypto state the host believes was unplugged and is no longer delegated to that VM. A:H - The guest can keep changing or destroying keys on the unplugged control domains and issue AP commands that render those domains unusable for the host or a sibling guest that should have received them after the QCI removal, denying IBM Z crypto services that depend on those domains.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to 12871a4269f139221c9fde9ea3eb69c9228f59d4 (excl.)
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to 02e72909453dee2f8a09f78819f9a9cb902dfbdc (excl.)
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to 4bffadde7fc49b00493fb78c6376f958998d4b8c (excl.)
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to f7d66afc34bc6e833c8ebe56973afec35f473bc1 (excl.)
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to 2ff68bf414de167bc138e6e211ee1ad3ab3c5052 (excl.)
  • affected from eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 to 6b8a02e216f6b520cc029e43ddc83956605135d5 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.0 is affected
  • unaffected from 0 to 6.0 (excl.)
  • unaffected from 6.1.188 to 6.1.* (incl.)
  • unaffected from 6.6.157 to 6.6.* (incl.)
  • unaffected from 6.12.110 to 6.12.* (incl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References