linux/drivers/vfio/platform
Alex Williamson f65ce06387 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-03-13 12:50:32 +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/platform: remove unneeded parent_module attribute 2021-06-15 14:12:15 -06:00
vfio_platform.c vfio/platform: remove unneeded parent_module attribute 2021-06-15 14:12:15 -06:00
vfio_platform_common.c vfio/platform: check the bounds of read/write syscalls 2025-03-13 12:50:32 +01:00
vfio_platform_irq.c vfio/platform: Create persistent IRQ handlers 2024-04-10 16:19:30 +02:00
vfio_platform_private.h vfio/platform: Use open_device() instead of open coding a refcnt scheme 2021-08-11 09:50:11 -06:00