CVE-2024-26620
JSON

8.2high

s390/vfio-ap: always filter entire AP matrix

Severity
8.2high CVSS:3.1 by Linux
Exploit likelihood
0.63% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 48cae940c31d2407d860d87c41d5f9871c0521db before d6b8d034b576f406af920a7bee81606c027b24c6, from 48cae940c31d2407d860d87c41d5f9871c0521db before c69d821197611678533fb3eb784fc823b921349a, from 48cae940c31d2407d860d87c41d5f9871c0521db before cdd134d56138302976685e6c7bc4755450b3880e, from 48cae940c31d2407d860d87c41d5f9871c0521db before 850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11, 6.0
Not affected: before 6.0, from 6.1.76 up to 6.1.*, from 6.6.15 up to 6.6.*, from 6.7.3 up to 6.7.*, from 6.8 up to *
CVE List
linux linux_kernelfrom 6.0 before 6.1.76, from 6.2 before 6.6.15, from 6.7 before 6.7.3NVD

All scores

Linux8.2high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: s390/vfio-ap: filtra siempre toda la matriz AP La función vfio_ap_mdev_filter_matrix se llama cada vez que se asigna un nuevo adaptador o dominio al mdev. El propósito de la función es actualizar la configuración del AP del invitado filtrando la matriz de adaptadores y dominios asignados al mdev. Cuando se asigna un adaptador o dominio, solo se inspeccionan los APQN asociados con el APID del nuevo adaptador o APQI del nuevo dominio. Si un APQN no hace referencia a un dispositivo de cola vinculado al controlador de dispositivo vfio_ap, entonces su APID se filtrará de la matriz de mdev al actualizar la configuración de AP del invitado. Inspeccionar solo el APID del nuevo adaptador o APQI del nuevo dominio dará como resultado que se pasen colas de AP a un invitado que no está vinculado al controlador de dispositivo vfio_ap en determinadas circunstancias. Considere lo siguiente: configuración de AP del invitado (todas también asignadas a la matriz de mdev): 14.0004 14.0005 14.0006 16.0004 16.0005 16.0006 desasignar dominio 4 desvincular cola 16.0005 asignar dominio 4 Cuando se reasigna el dominio 4, dado que solo se inspeccionará el dominio 4, los APQN que se examinará será: 14.0004 16.0004 Dado que ambos APQN hacen referencia a dispositivos de cola que están vinculados al controlador de dispositivo vfio_ap, no se filtrará nada de la matriz de mdev al actualizar la configuración de AP del invitado. En consecuencia, la cola 16.0005 pasará a pesar de no estar vinculada al conductor. Esto viola el requisito del modelo de dispositivo Linux de que a un invitado solo se le dará acceso a los dispositivos vinculados al controlador del dispositivo que facilita su paso. Para resolver este problema, cada adaptador y dominio asignado al mdev se inspeccionará al filtrar la matriz del mdev.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-26620 changed 2026-08-05CVE Terms of Use
NVDCVE-2024-26620 changed 2026-08-04Public domain