CVE-2026-99502: s390/pci: Fix double-free and NULL deref in zpci MSI domain cleanup
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
s390/pci: Fix double-free and NULL deref in zpci MSI domain cleanup
zpci_remove_parent_msi_domain() dereferences zbus->msi_parent_domain unconditionally and does not clear it afterwards.
zpci_bus_create_pci_bus() removes the domain when pci_create_root_bus() fails, then zpci_bus_release() removes it again on the last kref_put(), reading ->fwnode from the freed irq_domain and freeing it twice.
If zpci_alloc_domain() or zpci_create_parent_msi_domain() fails, no domain is created at all; zbus is kzalloc'd, so the same release path dereferences NULL.
Return early when there is no domain, and clear the pointer after removing one.
The Linux kernel CVE team has assigned CVE-2026-99502 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit f770950a4709af290f314e691897ec0003fbd8ae and fixed in 7.3.2 with commit 5259b258f234cca127651cd983ea879a7ad4ea8c Issue introduced in 6.19 with commit f770950a4709af290f314e691897ec0003fbd8ae and fixed in 7.4-rc1 with commit 31c66bd273303590fe69fad370e72a12faa0bf76
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-99502
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:
arch/s390/pci/pci_irq.c
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/5259b258f234cca127651cd983ea879a7ad4ea8c https://git.kernel.org/stable/c/31c66bd273303590fe69fad370e72a12faa0bf76