0f0f8b611e
The rom_ptr() function allows direct access to the ROM blobs that we load during startup. However, there are currently no checks for the size of the accesses, so it's currently possible to crash QEMU for example with: $ echo "Insane in the mainframe" > /tmp/test.txt $ s390x-softmmu/qemu-system-s390x -kernel /tmp/test.txt -append xyz Segmentation fault (core dumped) $ s390x-softmmu/qemu-system-s390x -kernel /tmp/test.txt -initrd /tmp/test.txt Segmentation fault (core dumped) $ echo -n HdrS > /tmp/hdr.txt $ sparc64-softmmu/qemu-system-sparc64 -kernel /tmp/hdr.txt -initrd /tmp/hdr.txt Segmentation fault (core dumped) We need a possibility to check the size of the ROM area that we want to access, thus let's add a size parameter to the rom_ptr() function to avoid these problems. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1530005740-25254-1-git-send-email-thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com> |
||
---|---|---|
.. | ||
bus.c | ||
empty_slot.c | ||
fw-path-provider.c | ||
generic-loader.c | ||
hotplug.c | ||
irq.c | ||
loader-fit.c | ||
loader.c | ||
machine.c | ||
Makefile.objs | ||
nmi.c | ||
null-machine.c | ||
or-irq.c | ||
platform-bus.c | ||
ptimer.c | ||
qdev-fw.c | ||
qdev-properties-system.c | ||
qdev-properties.c | ||
qdev.c | ||
register.c | ||
reset.c | ||
split-irq.c | ||
stream.c | ||
sysbus.c | ||
uboot_image.h |