CVE-2024-26620

s390/vfio-ap: always filter entire AP matrix

State
Published
Severity
8.2 High
Published
Feb 29, 2024
Updated
Aug 5, 2026
Reserved
Feb 19, 2024

Read the record on cve.org

Description

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

s390/vfio-ap: always filter entire AP matrix

The vfio_ap_mdev_filter_matrix function is called whenever a new adapter or domain is assigned to the mdev. The purpose of the function is to update the guest's AP configuration by filtering the matrix of adapters and domains assigned to the mdev. When an adapter or domain is assigned, only the APQNs associated with the APID of the new adapter or APQI of the new domain are inspected. If an APQN does not reference a queue device bound to the vfio_ap device driver, then it's APID will be filtered from the mdev's matrix when updating the guest's AP configuration.

Inspecting only the APID of the new adapter or APQI of the new domain will result in passing AP queues through to a guest that are not bound to the vfio_ap device driver under certain circumstances. Consider the following:

guest's AP configuration (all also assigned to the mdev's matrix): 14.0004 14.0005 14.0006 16.0004 16.0005 16.0006

unassign domain 4 unbind queue 16.0005 assign domain 4

When domain 4 is re-assigned, since only domain 4 will be inspected, the APQNs that will be examined will be: 14.0004 16.0004

Since both of those APQNs reference queue devices that are bound to the vfio_ap device driver, nothing will get filtered from the mdev's matrix when updating the guest's AP configuration. Consequently, queue 16.0005 will get passed through despite not being bound to the driver. This violates the linux device model requirement that a guest shall only be given access to devices bound to the device driver facilitating their pass-through.

To resolve this problem, every adapter and domain assigned to the mdev will be inspected when filtering the mdev's matrix.

Scores

CVSSScoreVectorSource
3.18.2 HighCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 48cae940c31d2407d860d87c41d5f9871c0521db to before d6b8d034b576f406af920a7bee81606c027b24c6Affected
  • 48cae940c31d2407d860d87c41d5f9871c0521db to before c69d821197611678533fb3eb784fc823b921349aAffected
  • 48cae940c31d2407d860d87c41d5f9871c0521db to before cdd134d56138302976685e6c7bc4755450b3880eAffected
  • 48cae940c31d2407d860d87c41d5f9871c0521db to before 850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11Affected
LinuxLinux
  • 6.0Affected
  • before 6.0Not affected
  • 6.1.76 through 6.1.*Not affected
  • 6.6.15 through 6.6.*Not affected
  • 6.7.3 through 6.7.*Not affected
  • 6.8 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.