]> git.baikalelectronics.ru Git - kernel.git/commit
vfio-mdev: buffer overflow in ioctl()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 7 Jan 2017 06:28:40 +0000 (09:28 +0300)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 11 Jan 2017 19:12:29 +0000 (12:12 -0700)
commit2455f8c5b30f577a2dbfe4e304448e2e1ae041f8
tree7f4659715113784f3c88cd1dc61414b0fcecf37e
parent818ec3a96a02943db91a9ab1410d6f95c5e84ce2
vfio-mdev: buffer overflow in ioctl()

This is a sample driver for documentation so the impact is probably
pretty low.  But we should check that bar_index is valid so we
don't write beyond the end of the mdev_state->region_info[] array.

Fixes: 6273d33f4737 ("docs: Sample driver to demonstrate how to use Mediated device framework.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mtty.c