qemu-patch-raspberry4/hw
Greg Kurz 9c6b899f7a 9pfs: local: set the path of the export root to "."
The local backend was recently converted to using "at*()" syscalls in order
to ensure all accesses happen below the shared directory. This requires that
we only pass relative paths, otherwise the dirfd argument to the "at*()"
syscalls is ignored and the path is treated as an absolute path in the host.
This is actually the case for paths in all fids, with the notable exception
of the root fid, whose path is "/". This causes the following backend ops to
act on the "/" directory of the host instead of the virtfs shared directory
when the export root is involved:
- lstat
- chmod
- chown
- utimensat

ie, chmod /9p_mount_point in the guest will be converted to chmod / in the
host for example. This could cause security issues with a privileged QEMU.

All "*at()" syscalls are being passed an open file descriptor. In the case
of the export root, this file descriptor points to the path in the host that
was passed to -fsdev.

The fix is thus as simple as changing the path of the export root fid to be
"." instead of "/".

This is CVE-2017-7471.

Cc: qemu-stable@nongnu.org
Reported-by: Léo Gaspard <leo@gaspard.io>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-18 14:01:43 +01:00
..
9pfs 9pfs: local: set the path of the export root to "." 2017-04-18 14:01:43 +01:00
acpi tco: do not generate an NMI 2017-04-05 17:23:52 +02:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
arm bcm2835: add sdhost and gpio controllers 2017-02-28 17:10:00 +00:00
audio es1370: wire up reset via DeviceClass 2017-01-11 09:19:03 +01:00
block xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
bt chardev: qom-ify 2017-01-27 18:08:00 +01:00
char xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
core block: add missed aio_context_acquire into release_drive 2017-04-03 17:11:39 +02:00
cpu Introduce DEVICE_CATEGORY_CPU for CPU devices 2017-01-27 18:07:31 +01:00
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display qxl: add migration blocker to avoid pre-save assert 2017-04-11 08:38:17 +02:00
dma dma/rc4030: fix a mixed declarations and code warning 2017-03-20 11:20:35 +00:00
gpio bcm2835_gpio: add bcm2835 gpio controller 2017-02-28 17:10:00 +00:00
i2c arm: Uniquely name imx25 I2C buses. 2017-01-20 11:15:06 +00:00
i386 trace: Avoid abuse of amdvi_mmio_read 2017-03-24 09:21:42 +00:00
ide ide: ahci: call cleanup function in ahci unit 2017-03-15 20:50:14 -04:00
input virtio-input: fix eventq batching 2017-03-27 12:14:45 +02:00
intc hw/intc/arm_gicv3_kvm: Check KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS in reset 2017-03-31 12:41:14 +01:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi ipmi: Fix macro issues 2017-04-02 21:17:47 +02:00
isa tco: do not generate an NMI 2017-04-05 17:23:52 +02:00
lm32 char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
m68k hw/m68k: QOMify the ColdFire interrupt controller 2017-02-18 22:23:31 +01:00
mem pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
microblaze clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
mips hw/mips: MIPS Boston board support 2017-02-24 10:37:21 +00:00
misc hw/misc/imx6_src: Don't crash trying to reset missing CPUs 2017-03-14 16:13:22 +00:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net e1000: disable debug by default 2017-03-31 08:48:13 +08:00
nios2 nios2: iic: Convert CPU prop to qom link 2017-03-18 18:22:54 +00:00
nvram hw/block: Request permissions 2017-02-28 20:40:36 +01:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
pci pci: Only unmap bus_master_enabled_region if was added previously 2017-04-04 18:32:25 +03:00
pci-bridge ppc patch queue 2017-02-02 2017-02-02 18:48:06 +00:00
pci-host ppc patch queue for 2017-02-22 2017-02-24 10:13:57 +00:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc pseries: Enforce homogeneous threads-per-core 2017-04-03 13:46:18 +10:00
s390x s390x/css: reassign subchannel if schid is changed after migration 2017-03-20 09:22:57 +01:00
scsi * MTTCG fix for win32 2017-03-27 17:34:50 +01:00
sd Block layer patches 2017-03-01 23:09:46 +00:00
sh4 hw: Default -drive to if=ide explicitly where it works 2017-02-21 13:10:53 +01:00
smbios stubs: move smbios stubs to hw/smbios 2017-01-16 17:52:35 +01:00
sparc sparc/sparc64: grab BQL before calling cpu_check_irqs 2017-03-09 10:41:38 +00:00
sparc64 sparc/sparc64: grab BQL before calling cpu_check_irqs 2017-03-09 10:41:38 +00:00
ssi aspeed/smc: use a modulo to check segment limits 2017-02-10 17:40:30 +00:00
timer armv7m: Split systick out from NVIC 2017-02-28 16:18:49 +00:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore tricore: remove useless cast 2016-09-15 15:32:22 +03:00
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb usb-host: switch to LIBUSB_API_VERSION 2017-04-03 14:41:23 +01:00
vfio vfio/pci-quirks: Exclude non-ioport BAR from NVIDIA quirk 2017-04-06 16:03:26 -06:00
virtio vhost: generalize iommu memory region 2017-03-30 19:09:16 +03:00
watchdog wdt: Add Aspeed watchdog device model 2017-02-07 18:29:59 +00:00
xen xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
xenpv xenpv: Fix qemu_uuid compiling error 2016-09-29 11:43:17 +08:00
xtensa target/xtensa: xtfpga: load DTB only when FDT support is enabled 2017-03-11 14:59:03 -08:00
Makefile.objs acpi: filter based on CONFIG_ACPI_X86 rather than TARGET 2017-01-16 17:52:35 +01:00