OSDN Git Service

block/export: fix vhost-user-blk get_config() information leak
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 27 Oct 2020 17:35:20 +0000 (17:35 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 3 Nov 2020 21:39:05 +0000 (16:39 -0500)
commitf8ffcb2bda22bad8e91da70c28ec52724a054f92
treeb4edd4a9702c55b847b4e45e7481198a86c55488
parent11f60f7eaee2630dd6fa0c3a8c49f792e46c4cf1
block/export: fix vhost-user-blk get_config() information leak

Refuse get_config() requests in excess of sizeof(struct virtio_blk_config).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20201027173528.213464-5-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
block/export/vhost-user-blk-server.c