[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_c
From: |
P J P |
Subject: |
Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info |
Date: |
Wed, 5 May 2021 12:53:49 +0530 (IST) |
+-- On Tue, 4 May 2021, Li Qiang wrote --+
| Otherwise some of the 'resp' will be leaked to guest.
|
| diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c
| index 9e6660c7ab..6a332d601f 100644
|
| + 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,
- vg_ctrl_response(g, cmd, &resp.hdr, sizeof(resp));
+ vg_ctrl_response(g, cmd, &resp.hdr, sizeof(resp.hdr));
* While memset(3) is okay, should it also send header(hdr) size as 'resp_len'?
Thank you.
--
- P J P
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
[PATCH 7/7] vhost-user-gpu: fix OOB write in 'virgl_cmd_get_capset', Li Qiang, 2021/05/05
[PATCH 5/7] vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref', Li Qiang, 2021/05/05
[PATCH 3/7] vhost-user-gpu: fix memory leak in vg_resource_attach_backing, Li Qiang, 2021/05/05