TencentOS-kernel/drivers/vfio/pci
Christian A. Ehrhardt d3438b24b3 vfio/pci: Add missing range check in vfio_pci_mmap
commit 909290786ea335366e21d7f1ed5812b90f2f0a92 upstream.

When mmaping an extra device region verify that the region index
derived from the mmap offset is valid.

Fixes: a15b1883fee1 ("vfio_pci: Allow mapping extra regions")
Cc: stable@vger.kernel.org
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Message-Id: <20210412214124.GA241759@lisa.in-ulm.de>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 16:07:11 +08:00
..
Kconfig vfio/nvlink: Add missing SPAPR_TCE_IOMMU depends 2021-05-20 16:06:50 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
trace.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vfio_pci.c vfio/pci: Add missing range check in vfio_pci_mmap 2021-05-20 16:07:11 +08:00
vfio_pci_config.c vfio/pci: Decouple PCI_COMMAND_MEMORY bit checks from is_virtfn 2021-03-16 16:39:00 +08:00
vfio_pci_igd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
vfio_pci_intrs.c vfio/pci: Clear token on bypass registration failure 2021-03-16 16:39:03 +08:00
vfio_pci_nvlink2.c vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU 2021-03-16 16:43:21 +08:00
vfio_pci_private.h vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2021-03-16 16:35:36 +08:00
vfio_pci_rdwr.c vfio-pci: Invalidate mmaps and block MMIO access on disabled memory 2021-03-16 16:35:36 +08:00