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
common.c
display.c
igd.c
Kconfig
meson.build
migration.c
pci-quirks.c
pci.c vfio/pci: Fix a use-after-free issue 2023-05-24 09:21:22 +02:00
pci.h
platform.c
spapr.c
trace-events
trace.h