linux-stable/drivers/vfio
Alex Williamson b95d9305e8 vfio/pci: Fix unsigned comparison overflow
Signed versus unsigned comparisons are implicitly cast to unsigned,
which result in a couple possible overflows.  For instance (start +
count) might overflow and wrap, getting through our validation test.
Also when unwinding setup, -1 being compared as unsigned doesn't
produce the intended stop condition.  Fix both of these and also fix
vfio_msi_set_vector_signal() to validate parameters before using the
vector index, though none of the callers should pass bad indexes
anymore.

Reported-by: Eric Auger <eric.auger@linaro.org>
Reviewed-by: Eric Auger <eric.auger@linaro.org>
Tested-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2016-02-22 16:03:54 -07:00
..
pci vfio/pci: Fix unsigned comparison overflow 2016-02-22 16:03:54 -07:00
platform VFIO: platform: reset: fix a warning message condition 2015-12-21 15:28:11 -07:00
Kconfig vfio: Include No-IOMMU mode 2015-12-21 15:28:11 -07:00
Makefile vfio: Split virqfd into a separate module for vfio bus drivers 2015-03-17 08:33:38 -06:00
vfio.c vfio/noiommu: Don't use iommu_present() to track fake groups 2016-01-27 11:22:25 -07:00
vfio_iommu_spapr_tce.c vfio: powerpc/spapr: Support Dynamic DMA windows 2015-06-11 15:16:55 +10:00
vfio_iommu_type1.c vfio/iommu_type1: make use of info.flags 2016-01-04 12:55:44 -07:00
vfio_spapr_eeh.c drivers/vfio: Support EEH error injection 2015-05-12 20:33:35 +10:00
virqfd.c vfio: Split virqfd into a separate module for vfio bus drivers 2015-03-17 08:33:38 -06:00