2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00
linux-next/drivers/dma/dw-edma
Dan Carpenter 595a334148 dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk()
If the dw_edma_alloc_burst() function fails then we free "chunk" but
it's still on the "desc->chunk->list" list so it will lead to a use
after free.  Also the "->chunks_alloc" count is incremented when it
shouldn't be.

In current kernels small allocations are guaranteed to succeed and
dw_edma_alloc_burst() can't fail so this will not actually affect
runtime.

Fixes: e63d79d1ff ("dmaengine: Add Synopsys eDMA IP core driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Link: https://lore.kernel.org/r/X9dTBFrUPEvvW7qc@mwanda
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-12-29 10:08:00 +05:30
..
dw-edma-core.c dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk() 2020-12-29 10:08:00 +05:30
dw-edma-core.h dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev 2020-04-17 17:20:20 +05:30
dw-edma-pcie.c dmaengine: dw-edma: Decouple dw-edma-core.c from struct pci_dev 2020-04-17 17:20:20 +05:30
dw-edma-v0-core.c dmaengine: dw-edma: fix endianess confusion 2019-07-22 20:58:15 +05:30
dw-edma-v0-core.h
dw-edma-v0-debugfs.c dmaengine: dw-edma: Fix Using plain integer as NULL pointer in dw-edma-v0-debugfs.c 2020-09-18 12:42:33 +05:30
dw-edma-v0-debugfs.h dmaengine: Add Synopsys eDMA IP version 0 debugfs support 2019-06-10 13:10:39 +05:30
dw-edma-v0-regs.h dmaengine: dw-edma: Fix typo in comments offset 2020-08-25 16:40:04 +05:30
Kconfig dmaengine: dw-edma: Fix build error without CONFIG_PCI_MSI 2019-06-12 10:22:02 +05:30
Makefile dmaengine: Add Synopsys eDMA IP PCIe glue-logic 2019-06-10 13:10:39 +05:30