qemu-e2k/hw/vfio
Zhenzhong Duan b83b40b614 vfio/pci: Fix a use-after-free issue
vbasedev->name is freed wrongly which leads to garbage VFIO trace log.
Fix it by allocating a dup of vbasedev->name and then free the dup.

Fixes: 2dca1b37a7 ("vfio/pci: add support for VF token")
Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2023-05-24 09:21:22 +02:00
..
amd-xgbe.c
ap.c
calxeda-xgmac.c
ccw.c hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() 2023-02-27 09:15:38 +01:00
common.c vfio/migration: Skip log_sync during migration SETUP state 2023-05-09 09:30:13 -06:00
display.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
igd.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
Kconfig
meson.build
migration.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
pci-quirks.c hw/vfio/pci-quirks: Resolve redundant property getters 2022-05-24 10:38:50 +10:00
pci.c vfio/pci: Fix a use-after-free issue 2023-05-24 09:21:22 +02:00
pci.h vfio/pci: add support for VF token 2023-05-09 09:30:13 -06:00
platform.c
spapr.c Replace qemu_real_host_page variables with inlined functions 2022-04-06 10:50:38 +02:00
trace-events vfio: Fix vfio_get_dev_region() trace event 2023-03-07 11:19:07 -07:00
trace.h