qemu-e2k/target/arm
Thomas Huth 0f0f8b611e loader: Check access size when calling rom_ptr() to avoid crashes
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>
2018-07-02 10:37:38 +02:00
..
arch_dump.c target/arm: Add aa{32, 64}_vfp_{dreg, qreg} helpers 2018-01-25 11:45:29 +00:00
arm_ldst.h target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
arm-powerctl.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
arm-powerctl.h target-arm/powerctl: defer cpu reset work to CPU context 2017-02-24 10:32:46 +00:00
arm-semi.c
cpu64.c target/arm: Add ID_ISAR6 2018-06-29 15:30:54 +01:00
cpu-qom.h target/arm: Add "-cpu max" support 2018-03-09 17:09:44 +00:00
cpu.c loader: Check access size when calling rom_ptr() to avoid crashes 2018-07-02 10:37:38 +02:00
cpu.h target/arm: Add ID_ISAR6 2018-06-29 15:30:54 +01:00
crypto_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
gdbstub64.c
gdbstub.c arm: fix malloc type mismatch 2018-05-31 14:50:52 +01:00
helper-a64.c tcg: Fix helper function vs host abi for float16 2018-05-31 14:50:51 +01:00
helper-a64.h target/arm: Implement FCMP for fp16 2018-05-15 14:58:43 +01:00
helper-sve.h target/arm: Implement SVE fp complex multiply add 2018-06-29 15:11:12 +01:00
helper.c target/arm: Add ID_ISAR6 2018-06-29 15:30:54 +01:00
helper.h target/arm: Implement SVE dot product (indexed) 2018-06-29 15:11:15 +01:00
idau.h target/arm: Define an IDAU interface 2018-03-02 11:03:45 +00:00
internals.h target/arm: Add pre-EL change hooks 2018-04-26 11:04:39 +01:00
iwmmxt_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
kvm32.c target/arm: Remove redundant DIV detection for KVM 2018-06-29 15:11:18 +01:00
kvm64.c target/arm: Query host CPU features on-demand at instance init 2018-03-09 17:09:44 +00:00
kvm_arm.h target/arm: Allow KVM device address overwriting 2018-06-22 13:28:35 +01:00
kvm-consts.h arm: add trailing ; after MISMATCH_CHECK 2017-02-01 03:37:18 +02:00
kvm-stub.c
kvm.c target/arm: Allow KVM device address overwriting 2018-06-22 13:28:35 +01:00
machine.c target/arm: Implement v8M MSPLIM and PSPLIM registers 2018-02-15 18:29:49 +00:00
Makefile.objs target/arm: Implement SVE predicate test 2018-05-18 17:48:08 +01:00
monitor.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
neon_helper.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
op_addsub.h
op_helper.c target/arm: Add pre-EL change hooks 2018-04-26 11:04:39 +01:00
psci.c target: Do not include "exec/exec-all.h" if it is not necessary 2018-06-01 14:15:10 +02:00
sve_helper.c target/arm: Fix SVE signed division vs x86 overflow exception 2018-06-29 15:28:24 +01:00
sve.decode target/arm: Implement SVE dot product (indexed) 2018-06-29 15:11:15 +01:00
trace-events target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route 2018-05-04 18:52:58 +01:00
translate-a64.c target/arm: Fix SVE system register access checks 2018-06-29 15:30:53 +01:00
translate-a64.h target/arm: Extend vec_reg_offset to larger sizes 2018-06-15 15:23:34 +01:00
translate-sve.c target/arm: Implement SVE dot product (indexed) 2018-06-29 15:11:15 +01:00
translate.c target/arm: Implement ARMv8.2-DotProd 2018-06-29 15:11:15 +01:00
translate.h target/arm: convert conversion helpers to fpst/ahp_flag 2018-05-17 15:27:09 -07:00
vec_helper.c target/arm: Implement SVE dot product (indexed) 2018-06-29 15:11:15 +01:00