linux/drivers/vfio/platform
Alex Williamson 1485932496 vfio/platform: check the bounds of read/write syscalls
commit ce9ff21ea8 upstream.

count and offset are passed from user space and not checked, only
offset is capped to 40 bits, which can be used to read/write out of
bounds of the device.

Fixes: 6e3f264560 (“vfio/platform: read and write support for the device fd”)
Cc: stable@vger.kernel.org
Reported-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Mostafa Saleh <smostafa@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-02-21 13:49:50 +01:00
..
reset Merge branches 'v5.15/vfio/spdx-license-cleanups', 'v5.15/vfio/dma-valid-waited-v3', 'v5.15/vfio/vfio-pci-core-v5' and 'v5.15/vfio/vfio-ap' into v5.15/vfio/next 2021-08-26 11:08:50 -06:00
Kconfig vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' 2021-08-26 10:36:51 -06: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_amba.c vfio/amba: Use the new device life cycle helpers 2022-09-21 14:15:11 -06:00
vfio_platform.c vfio/platform: Use the new device life cycle helpers 2022-09-21 14:15:11 -06:00
vfio_platform_common.c vfio/platform: check the bounds of read/write syscalls 2025-02-21 13:49:50 +01:00
vfio_platform_irq.c vfio/platform: Create persistent IRQ handlers 2024-04-03 15:19:46 +02:00
vfio_platform_private.h vfio/amba: Use the new device life cycle helpers 2022-09-21 14:15:11 -06:00