Re: [PATCH] PCI: xgene-msi: Fix a potential UAF in xgene_msi_probe

From
Marc Zyngier <maz@kernel.org>
Date
2023-09-29 09:14:34
Also in
linux-pci, lkml
Reply to
Dinghao Liu, 2023-09-26
On Tue, 26 Sep 2023 03:59:36 +0100,
Dinghao Liu [off-list ref] wrote:
xgene_allocate_domains() will call irq_domain_remove() to free
msi->inner_domain on failure. However, its caller, xgene_msi_probe(),
will also call irq_domain_remove() through xgene_msi_remove() on the
same failure, which may lead to a use-after-free. Remove the first
irq_domain_remove() and let xgene_free_domains() cleanup domains.

Fixes: dcd19de36775 ("PCI: xgene: Add APM X-Gene v1 PCIe MSI/MSIX termination driver")
Signed-off-by: Dinghao Liu <redacted>
---

Changelog:

v2: -Remove irq_domain_remove() instead of nulling msi_domain.
Unfortunately, your email doesn't indicate this is v2.

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (3 messages) 3 messages, 2 authors, last reply 2023-09-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help