linux-stable/drivers/vfio
Gustavo A. R. Silva 0e714d2778 vfio/pci: Fix potential Spectre v1
info.index can be indirectly controlled by user-space, hence leading
to a potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/vfio/pci/vfio_pci.c:734 vfio_pci_ioctl()
warn: potential spectre issue 'vdev->region'

Fix this by sanitizing info.index before indirectly using it to index
vdev->region

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&m=152449131114778&w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2018-07-18 12:57:25 -06:00
..
mdev vfio/mdev: Re-order sysfs attribute creation 2018-06-08 10:24:30 -06:00
pci vfio/pci: Fix potential Spectre v1 2018-07-18 12:57:25 -06:00
platform vfio: platform: Fix using devices in PM Domains 2018-06-08 10:24:37 -06:00
Kconfig vfio: Fix build break when SPAPR_TCE_IOMMU=n 2017-02-08 13:13:25 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio.c vfio: use match_string() helper 2018-06-08 10:24:33 -06:00
vfio_iommu_spapr_tce.c vfio/spapr: Add cond_resched() for huge updates 2017-10-02 12:39:11 -06:00
vfio_iommu_type1.c vfio: Use get_user_pages_longterm correctly 2018-06-30 13:58:09 -06:00
vfio_spapr_eeh.c drivers/vfio: Support EEH error injection 2015-05-12 20:33:35 +10:00
virqfd.c fs: add new vfs_poll and file_can_poll helpers 2018-05-26 09:16:44 +02:00