KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 73f91b004321f2510fa79e66035dbbf1870fcf56 · < 16d990a15491cf76cd6eef0846e1b4100e63261a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic
kvm_s390_pci_aif_enable(), kvm_s390_pci_aif_disable(), and aen_host_forward() index the GAIT by manually multiplying the index with sizeof(struct zpci_gaite).
Since aift->gait is already a struct zpci_gaite pointer, this double-scales the offset, accessing element aisb*16 instead of aisb.
This causes out-of-bounds accesses when aisb >= 32 (with ZPCI_NR_DEVICES=512)
Fix by removing the erroneous sizeof multiplication.
From the CVE record · Linux
The Linux kernel’s KVM s390 PCI code double-scales an index into the GAIT table. This causes out-of-bounds access when the AISB index is 32 or higher. The input does not specify attacker access requirements or user interaction.
Engineers running the Linux kernel with KVM s390 PCI support should check their installations; affected versions are not specified.