qemu-e2k/hw
Li Qiang 7e55d65c56 9pfs: fix integer overflow issue in xattr read/write
The v9fs_xattr_read() and v9fs_xattr_write() are passed a guest
originated offset: they must ensure this offset does not go beyond
the size of the extended attribute that was set in v9fs_xattrcreate().
Unfortunately, the current code implement these checks with unsafe
calculations on 32 and 64 bit values, which may allow a malicious
guest to cause OOB access anyway.

Fix this by comparing the offset and the xattr size, which are
both uint64_t, before trying to compute the effective number of bytes
to read or write.

Suggested-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-By: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
2016-11-01 12:03:01 +01:00
..
9pfs 9pfs: fix integer overflow issue in xattr read/write 2016-11-01 12:03:01 +01:00
acpi
adc
alpha
arm hw/arm/tosa: Fix reset handling 2016-10-28 15:51:27 +01:00
audio
block Xen 2016/10/28 2016-10-31 12:35:39 +00:00
bt
char Xen 2016/10/28 2016-10-31 12:35:39 +00:00
core
cpu
cris
display Xen 2016/10/28 2016-10-31 12:35:39 +00:00
dma
gpio i.MX: Fix GPIO ISR register write 2016-10-28 15:51:27 +01:00
i2c
i386 Base patches for MTTCG enablement. 2016-10-31 15:29:12 +00:00
ide
input adb: change handler only when recognized 2016-10-28 09:38:26 +11:00
intc pseries: Move construction of /interrupt-controller fdt node 2016-10-28 09:38:26 +11:00
ipack
ipmi
isa
lm32
m68k
mem
microblaze clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
mips clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
misc milkymist-pfpu: fix potential integer overflow 2016-10-28 18:17:23 +03:00
moxie
net xen: Rename xen_be_send_notify 2016-10-28 17:54:21 -07:00
nvram trivial patches for 2016-10-28 2016-10-31 11:58:30 +00:00
openrisc
pci
pci-bridge clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
pci-host
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc Base patches for MTTCG enablement. 2016-10-31 15:29:12 +00:00
s390x Two PCI fixes/improvements for s390x. 2016-10-31 14:48:47 +00:00
scsi -----BEGIN PGP SIGNATURE----- 2016-10-31 10:10:16 +00:00
sd
sh4
smbios
sparc
sparc64
ssi
timer clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb Xen 2016/10/28 2016-10-31 12:35:39 +00:00
vfio vfio: Add support for mmapping sub-page MMIO BARs 2016-10-31 09:53:04 -06:00
virtio char: use qemu_chr_fe* functions with CharBackend argument 2016-10-24 15:27:21 +02:00
watchdog
xen xen: Rename xen_be_del_xendev 2016-10-28 17:54:49 -07:00
xenpv
xtensa
Makefile.objs