virtio-gpu: fix information leak in getting capset info dispatch
PATCH 1/1 virtio-gpu: fix information leak in getting capset info dispatch
From: Li Qiang <[email protected]>
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 <[email protected]>
--- hw/display/virtio-gpu-3d.c | 1 + 1 file changed, 1 insertion(+)
hw/display/virtio-gpu-3d.c +1 -0
@@ -347,6 +347,7 @@ static void virgl_cmd_get_capset_info(VirtIOGPU *g,VIRTIO_GPU_FILL_CMD (info); +memset (&resp,0 ,sizeof (resp));if (info.capset_index ==0 ) { resp.capset_id =VIRTIO_GPU_CAPSET_VIRGL ; virgl_renderer_get_cap_set(resp.capset_id,
Signature · 1 line
1.8.3.1
Quoted 8 lines · Li Qiang
From: Li Qiang <[email protected]>
In
virgl_cmd_get_capset_infodispatch 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 <[email protected]>
Added to vga queue.
thanks,
Gerd