WSL2-Linux-Kernel/drivers/base
Catalin Marinas 1a3389ffc5 drivers: dma-mapping: Do not leave an invalid area->pages pointer in dma_common_contiguous_remap()
The dma_common_pages_remap() function allocates a vm_struct object and
initialises the pages pointer to value passed as argument. However, when
this function is called dma_common_contiguous_remap(), the pages array
is only temporarily allocated, being freed shortly after
dma_common_contiguous_remap() returns. Architecture code checking the
validity of an area->pages pointer would incorrectly dereference already
freed pointers. This has been exposed by the arm64 commit 44176bb38f
("arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU").

Fixes: 513510ddba ("common: dma-mapping: introduce common remapping functions")
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reported-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-03 18:51:12 +09:00
..
power More power management updates for v4.12-rc1 2017-05-10 09:12:30 -07:00
regmap
test
Kconfig
Makefile
attribute_container.c
base.h
bus.c kobject: support passing in variables for synthetic uevents 2017-05-25 18:30:51 +02:00
cacheinfo.c
class.c
component.c
container.c
core.c kobject: support passing in variables for synthetic uevents 2017-05-25 18:30:51 +02:00
cpu.c
dd.c of/acpi: Configure dma operations at probe time for platform/amba/pci bus devices 2017-04-20 16:31:06 +02:00
devcoredump.c
devres.c
devtmpfs.c statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
dma-coherent.c
dma-contiguous.c cma: Store a name in the cma structure 2017-04-18 20:41:12 +02:00
dma-mapping.c drivers: dma-mapping: Do not leave an invalid area->pages pointer in dma_common_contiguous_remap() 2017-06-03 18:51:12 +09:00
driver.c
firmware.c
firmware_class.c
hypervisor.c
init.c
isa.c
map.c
memory.c memory-hotplug: use dev_online for memhp_auto_online 2017-02-24 17:46:56 -08:00
module.c
node.c
pinctrl.c
platform-msi.c platform-msi: Make platform_msi_create_device_domain() ACPI aware 2017-04-07 10:52:19 +01:00
platform.c driver core: platform: fix race condition with driver_override 2017-05-25 15:30:12 +02:00
property.c device property: Read strings using string array reading functions 2017-03-29 22:59:40 +02:00
soc.c base: soc: Allow early registration of a single SoC device 2017-03-29 21:43:26 +02:00
syscore.c
topology.c
transport_class.c