qemu-e2k/hw/misc
Stefan Hajnoczi a2e9011b41 ivshmem: Check ivshmem_read() size argument
The third argument to the fd_read() callback implemented by
ivshmem_read() is the number of bytes, not a flags field.  Fix this and
check we received enough bytes before accessing the buffer pointer.

Cc: Cam Macdonell <cam@cs.ualberta.ca>
Reported-by: Sebastian Krahmer <krahmer@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
[AF: Handle partial reads via FIFO]
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-10-31 17:01:44 +01:00
..
macio PPC: Cuda: Use cuda timer to expose tbfreq to guest 2014-09-08 12:50:52 +02:00
a9scu.c a9mpcore: Embed A9SCUState 2013-11-05 17:47:29 +01:00
applesmc.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
arm11scu.c arm11mpcore: Split off SCU device 2013-11-05 17:47:30 +01:00
arm_integrator_debug.c integrator: fix Linux boot failure by emulating dbg region 2013-10-31 14:00:16 +01:00
arm_l2x0.c sysbus: Set cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
arm_sysctl.c hw/misc/arm_sysctl: Fix bad boundary check on mb clock accesses 2014-02-26 17:19:57 +00:00
cbus.c hw: Fix qemu_allocate_irqs() leaks 2014-06-30 21:13:30 +02:00
debugexit.c qdev: Remove hex8/32/64 property types 2014-02-14 21:12:04 +01:00
eccmemctl.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
exynos4210_pmu.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
imx_ccm.c hw/misc/imx_ccm.c: Add missing VMState list terminator 2014-07-22 17:53:36 +01:00
ivshmem.c ivshmem: Check ivshmem_read() size argument 2014-10-31 17:01:44 +01:00
Makefile.objs lm32: remove lm32_sys 2014-05-24 19:43:52 +02:00
max111x.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
milkymist-hpdmc.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
milkymist-pfpu.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
mst_fpga.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
omap_clk.c hw: move other devices to hw/misc/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
omap_gpmc.c omap_gpmc.c: Remove duplicate assignment 2014-10-24 12:19:12 +01:00
omap_l4.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_sdrc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_tap.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
pc-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
pci-testdev.c memory: remove memory_region_destroy 2014-08-18 12:06:21 +02:00
puv3_pm.c puv3_pm: QOM cast cleanup 2013-07-29 21:06:59 +02:00
pvpanic.c qapi event: convert GUEST_PANICKED 2014-06-23 11:12:28 -04:00
sga.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
slavio_misc.c savevm: Remove all the unneeded version_minimum_id_old (rest) 2014-05-14 15:24:51 +02:00
tmp105.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
tmp105.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
vfio.c Add skip_dump flag to ignore memory region during dump 2014-10-31 11:29:01 +01:00
vmport.c isa: Clean up use of cannot_instantiate_with_device_add_yet 2013-12-23 00:27:23 +01:00
zynq_slcr.c savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00