Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-06 Thread Li Qiang
P J P 于2021年5月6日周四 下午1:53写道: > > +-- On Wed, 5 May 2021, Li Qiang wrote --+ > | P J P 于2021年5月5日周三 下午3:24写道: > | > - vg_ctrl_response(g, cmd, , sizeof(resp)); > | > + vg_ctrl_response(g, cmd, , sizeof(resp.hdr)); > | > > | > * While memset(3) is okay, should it also send header(hdr) size as

Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-05 Thread P J P
+-- On Wed, 5 May 2021, Li Qiang wrote --+ | P J P 于2021年5月5日周三 下午3:24写道: | > - vg_ctrl_response(g, cmd, , sizeof(resp)); | > + vg_ctrl_response(g, cmd, , sizeof(resp.hdr)); | > | > * While memset(3) is okay, should it also send header(hdr) size as 'resp_len'? | | I don't think so. This

Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-05 Thread Li Qiang
P J P 于2021年5月5日周三 下午3:24写道: > > +-- 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(, 0,

Re: [PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-05 Thread P J P
+-- 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(, 0, sizeof(resp)); | if (info.capset_index == 0) { |

[PATCH 1/7] vhost-user-gpu: fix memory disclosure in virgl_cmd_get_capset_info

2021-05-04 Thread Li Qiang
Otherwise some of the 'resp' will be leaked to guest. Signed-off-by: Li Qiang --- contrib/vhost-user-gpu/virgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/vhost-user-gpu/virgl.c b/contrib/vhost-user-gpu/virgl.c index 9e6660c7ab..6a332d601f 100644 ---