Skip to contentSkip to conversation

CVE-2026-89795: PCI: Allow per function PCI slots to fix slot reset on s390

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

PCI: Allow per function PCI slots to fix slot reset on s390

On s390 systems, which use a machine level hypervisor, PCI devices are always accessed through a form of PCI pass-through which fundamentally operates on a per PCI function granularity. This is also reflected in the s390 PCI hotplug driver which creates hotplug slots for individual PCI functions. Its reset_slot() function, which is a wrapper for zpci_hot_reset_device(), thus also resets individual functions.

Currently, the pci_create_slot() assigns the same pci_slot object to multifunction devices. This approach worked fine on s390 systems that only exposed virtual functions as individual PCI domains to the operating system. Since commit 44510d6fa0c0 ("s390/pci: Handling multifunctions") s390 supports exposing the topology of multifunction PCI devices by grouping them in a shared PCI domain. This creates a problem when resetting a function through the hotplug driver's slot_reset() interface.

When attempting to reset a function through the hotplug driver, the shared slot assignment causes the wrong function to be reset instead of the intended one. It also leaks memory as we do create a pci_slot object for the function, but don't correctly free it in pci_slot_release().

Add a flag for struct pci_slot to allow per function PCI slots for functions managed through a hypervisor, which exposes individual PCI functions while retaining the topology. Since we can use all 8 bits for slot 'number' (for ARI devices), change slot 'number' u16 to account for special values PCI_SLOT_PLACEHOLDER and PCI_SLOT_ALL_DEVICES.

The Linux kernel CVE team has assigned CVE-2026-89795 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.8 with commit 44510d6fa0c00aa90b80075caa6b313b25927475 and fixed in 6.18.52 with commit 2050d900f9adbd6d6f38d30e182bcd9ad3108467
	Issue introduced in 5.8 with commit 44510d6fa0c00aa90b80075caa6b313b25927475 and fixed in 7.2.5 with commit ecdcceed4d377b02d4ea036b65f83f962c38ede7
	Issue introduced in 5.8 with commit 44510d6fa0c00aa90b80075caa6b313b25927475 and fixed in 7.3-rc1 with commit dcc5bec09e23bbc4f9de055a11fce9937244f2c8

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89795

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/pci/pci.c
drivers/pci/slot.c
include/linux/pci.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/2050d900f9adbd6d6f38d30e182bcd9ad3108467
	https://git.kernel.org/stable/c/ecdcceed4d377b02d4ea036b65f83f962c38ede7
	https://git.kernel.org/stable/c/dcc5bec09e23bbc4f9de055a11fce9937244f2c8