[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 5385a5: hw/virtio/virtio-balloon: zero-initia

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5385a5: hw/virtio/virtio-balloon: zero-initialize the virt...
Date: Mon, 21 Jan 2019 09:52:59 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5385a5988c8a55bebdc878c05b96648579b5d6e0
  Author: Peter Maydell <address@hidden>
  Date:   2019-01-21 (Mon, 21 Jan 2019)

  Changed paths:
    M hw/virtio/virtio-balloon.c

  Log Message:
  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: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden

      **NOTE:** This service has been marked for deprecation: 

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]