qxl: map rom r/o
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 25 Feb 2020 05:59:19 +0000 (06:59 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 2 Mar 2020 07:24:36 +0000 (08:24 +0100)
commit44b5c1ebfa5db337714180e9d4a8d525da5595d6
tree4299858e63c79ae06c181ede800e62ce36caa565
parentcd8fef8d4b2dfeadc68ffb4d741ab23e9e13dad1
qxl: map rom r/o

Map qxl rom read-only into the guest, so the guest can't tamper with the
content.  qxl has a shadow copy of the rom to deal with that, but the
shadow doesn't cover the mode list.  A privilidged user in the guest can
manipulate the mode list and that to trick qemu into oob reads, leading
to a DoS via segfault if that read access happens to hit unmapped memory.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200225055920.17261-2-kraxel@redhat.com
hw/display/qxl.c