summaryrefslogtreecommitdiffstats
path: root/hw/core/machine.c
diff options
context:
space:
mode:
authorPeter Maydell2019-01-18 19:36:03 +0100
committerPeter Maydell2019-01-21 18:20:36 +0100
commit5385a5988c8a55bebdc878c05b96648579b5d6e0 (patch)
treeceaeae9a04d4fb85a6ad3af35ae0f70102790f3f /hw/core/machine.c
parenthw/block/xen: use proper format string for printing sectors (diff)
downloadqemu-5385a5988c8a55bebdc878c05b96648579b5d6e0.tar.gz
qemu-5385a5988c8a55bebdc878c05b96648579b5d6e0.tar.xz
qemu-5385a5988c8a55bebdc878c05b96648579b5d6e0.zip
hw/virtio/virtio-balloon: zero-initialize the virtio_balloon_config struct
In virtio_balloon_get_config() we initialize a struct virtio_balloon_config which we then copy to guest memory. However, the local variable is not zero initialized. This works OK at the moment because we initialize all the fields in it; however an upcoming kernel header change will add some new fields. If we don't zero out the whole struct then we will start leaking a small amount of the contents of QEMU's stack to the guest as soon as we update linux-headers/ to a set of headers that includes the new fields. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190118183603.24757-1-peter.maydell@linaro.org
Diffstat (limited to 'hw/core/machine.c')
0 files changed, 0 insertions, 0 deletions