summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-07-04 12:42:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-29 10:21:36 +0100
commit2b85c83c6ec16e417cc987e695037c3ae2faa010 (patch)
treeec4af5db7251cba60fb1b83c9f3a9dbadcc0bf1f /scripts
parentaf266e1fd4aeae3e45e48bb54142b043d20abc85 (diff)
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: 62fb7a5e1096 ("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>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions