android_kernel_sony_sdm845/drivers/gpu/drm/virtio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter 0c7f2cad14 drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()
[ Upstream commit 09c4b49457434fa74749ad6194ef28464d9f5df9 ]

This doesn't affect runtime because in the current code "idx" is always
valid.

First, we read from "vgdev->capsets[idx].max_size" before checking
whether "idx" is within bounds.  And secondly the bounds check is off by
one so we could end up reading one element beyond the end of the
vgdev->capsets[] array.

Fixes: 62fb7a5e10 ("virtio-gpu: add 3d/virgl support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180704094250.m7sgvvzg3dhcvv3h@kili.mountain
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-29 10:24:01 +01:00
..
Kconfig drm/virtio: make fbdev support really optional 2016-07-18 09:11:40 +02:00
Makefile
virtgpu_debugfs.c
virtgpu_display.c virtio-gpu: fix vblank events 2016-11-03 10:14:19 +10:00
virtgpu_drm_bus.c drm: virtio: reinstate drm_virtio_set_busid() 2016-10-04 13:10:30 +10:00
virtgpu_drv.c drm: virtio: reinstate drm_virtio_set_busid() 2016-10-04 13:10:30 +10:00
virtgpu_drv.h drm: virtio: reinstate drm_virtio_set_busid() 2016-10-04 13:10:30 +10:00
virtgpu_fb.c drm/virtio: fix framebuffer sparse warning 2017-08-11 08:49:35 -07:00
virtgpu_fence.c drm/virtio: add real fence context and seqno 2016-09-20 14:25:43 +02:00
virtgpu_gem.c
virtgpu_ioctl.c drm/virtio: Add memory barriers for capset cache. 2019-08-04 09:33:37 +02:00
virtgpu_kms.c drm/virtio: add real fence context and seqno 2016-09-20 14:25:43 +02:00
virtgpu_object.c drm/virtio: don't leak bo on drm_gem_object_init failure 2017-07-12 15:01:03 +02:00
virtgpu_plane.c virtio-gpu: avoid possible NULL pointer dereference 2016-09-20 14:25:39 +02:00
virtgpu_prime.c
virtgpu_ttm.c drm/ttm: add wait for idle in all drivers bo_move functions 2016-07-07 14:54:35 -04:00
virtgpu_vq.c drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset() 2020-01-29 10:24:01 +01:00