]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/pci: Add missing range check in vfio_pci_mmap
authorChristian A. Ehrhardt <lk@c--e.de>
Mon, 12 Apr 2021 21:41:24 +0000 (23:41 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 13 Apr 2021 14:29:16 +0000 (08:29 -0600)
commitd8b755d4632c70d74d098119571fe58269459e08
tree79f0dd7ee483a36b32023bcae2e6ed9be462683a
parentee7c5a800b7712543c03f412a7611ba9000cd43f
vfio/pci: Add missing range check in vfio_pci_mmap

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

Fixes: d81e5fae077e ("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>
drivers/vfio/pci/vfio_pci.c