virtio-gpu: fix information leak in getting capset info dispatch
commit42a8dadc74f8982fc269e54e3c5627b54d9f83d8
authorLi Qiang <liqiang6-s@360.cn>
Tue, 1 Nov 2016 09:53:11 +0000 (1 02:53 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 5 Dec 2016 08:37:52 +0000 (5 09:37 +0100)
treec83bb19954ac8a4f5a120ee44dc6d08aecc2d7ef
parent6c7565028c272c4c6f2a83c3a90b044eeaf2804a
virtio-gpu: fix information leak in getting capset info dispatch

In virgl_cmd_get_capset_info dispatch function, the 'resp' hasn't
been full initialized before writing to the guest. This will leak
the 'resp.padding' and 'resp.hdr.padding' fieds to the guest. This
patch fix this issue.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5818661e.0860240a.77264.7a56@mx.google.com
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu-3d.c