Linux kernel double-free in s390 PCI MSI domain cleanup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s s390 PCI MSI domain cleanup can dereference a NULL pointer if domain creation fails. If PCI root bus creation fails, cleanup can instead access a freed domain and free it twice. The input does not specify whether an attacker can trigger these failures, or any network, authentication, or user-interaction conditions.
Engineers running the Linux kernel on s390 systems using PCI should check their kernel versions against the vendor advisory; affected versions are not specified.