summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/vfio.c
diff options
context:
space:
mode:
authorAlex Williamson2016-02-23 00:02:29 +0100
committerAlex Williamson2016-02-23 00:03:54 +0100
commitb95d9305e8cb8d432ca02da1b759fef59bc50ace (patch)
treea03a6873c98e0abaa3caabb333ce7989f742eb7e /drivers/vfio/vfio.c
parentLinux 4.5-rc5 (diff)
downloadkernel-qcow2-linux-b95d9305e8cb8d432ca02da1b759fef59bc50ace.tar.gz
kernel-qcow2-linux-b95d9305e8cb8d432ca02da1b759fef59bc50ace.tar.xz
kernel-qcow2-linux-b95d9305e8cb8d432ca02da1b759fef59bc50ace.zip
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>
Diffstat (limited to 'drivers/vfio/vfio.c')
0 files changed, 0 insertions, 0 deletions