CVE-2024-26620
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
11/03/2024
Last modified:
14/02/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
s390/vfio-ap: always filter entire AP matrix<br />
<br />
The vfio_ap_mdev_filter_matrix function is called whenever a new adapter or<br />
domain is assigned to the mdev. The purpose of the function is to update<br />
the guest&#39;s AP configuration by filtering the matrix of adapters and<br />
domains assigned to the mdev. When an adapter or domain is assigned, only<br />
the APQNs associated with the APID of the new adapter or APQI of the new<br />
domain are inspected. If an APQN does not reference a queue device bound to<br />
the vfio_ap device driver, then it&#39;s APID will be filtered from the mdev&#39;s<br />
matrix when updating the guest&#39;s AP configuration.<br />
<br />
Inspecting only the APID of the new adapter or APQI of the new domain will<br />
result in passing AP queues through to a guest that are not bound to the<br />
vfio_ap device driver under certain circumstances. Consider the following:<br />
<br />
guest&#39;s AP configuration (all also assigned to the mdev&#39;s matrix):<br />
14.0004<br />
14.0005<br />
14.0006<br />
16.0004<br />
16.0005<br />
16.0006<br />
<br />
unassign domain 4<br />
unbind queue 16.0005<br />
assign domain 4<br />
<br />
When domain 4 is re-assigned, since only domain 4 will be inspected, the<br />
APQNs that will be examined will be:<br />
14.0004<br />
16.0004<br />
<br />
Since both of those APQNs reference queue devices that are bound to the<br />
vfio_ap device driver, nothing will get filtered from the mdev&#39;s matrix<br />
when updating the guest&#39;s AP configuration. Consequently, queue 16.0005<br />
will get passed through despite not being bound to the driver. This<br />
violates the linux device model requirement that a guest shall only be<br />
given access to devices bound to the device driver facilitating their<br />
pass-through.<br />
<br />
To resolve this problem, every adapter and domain assigned to the mdev will<br />
be inspected when filtering the mdev&#39;s matrix.
Impact
Base Score 3.x
7.50
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.0 (including) | 6.1.76 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.15 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.7.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11
- https://git.kernel.org/stable/c/c69d821197611678533fb3eb784fc823b921349a
- https://git.kernel.org/stable/c/cdd134d56138302976685e6c7bc4755450b3880e
- https://git.kernel.org/stable/c/d6b8d034b576f406af920a7bee81606c027b24c6
- https://git.kernel.org/stable/c/850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11
- https://git.kernel.org/stable/c/c69d821197611678533fb3eb784fc823b921349a
- https://git.kernel.org/stable/c/cdd134d56138302976685e6c7bc4755450b3880e
- https://git.kernel.org/stable/c/d6b8d034b576f406af920a7bee81606c027b24c6



