WSL2-Linux-Kernel/drivers/pci/msi
Thomas Gleixner a0af3d1104 PCI/MSI: Prevent UAF in error path
When the core MSI allocation fails, then the PCI/MSI code uses an already
freed MSI descriptor to unmask the MSI mask register in order to bring it back
into reset state.

Remove MSI_FLAG_FREE_MSI_DESCS from the PCI/MSI irqdomain flags and let the
PCI/MSI code free the MSI descriptors after usage.

Fixes: 0f62d941ac ("genirq/msi: Provide msi_domain_alloc/free_irqs_descs_locked()")
Reported-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Tong Zhang <ztong0001@gmail.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/87r1938vbn.ffs@tglx
2022-01-21 02:14:46 +01:00
..
Makefile PCI/MSI: Split out irqdomain code 2021-12-09 11:52:22 +01:00
irqdomain.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
legacy.c PCI/MSI: Prevent UAF in error path 2022-01-21 02:14:46 +01:00
msi.c PCI/MSI: Unbreak pci_irq_get_affinity() 2021-12-18 20:33:21 +01:00
msi.h PCI/MSI: Split out irqdomain code 2021-12-09 11:52:22 +01:00
pcidev_msi.c