Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-23 Thread Philippe Mathieu-Daudé
On 17/5/23 04:46, Zhenzhong Duan wrote: 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 Signed-off-by: Zhenzhong Duan

Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-23 Thread Alex Williamson
On Tue, 23 May 2023 11:17:47 -0600 Alex Williamson wrote: > On Tue, 23 May 2023 13:00:53 -0400 > Matthew Rosato wrote: > > > On 5/16/23 10:46 PM, Zhenzhong Duan wrote: > > > vbasedev->name is freed wrongly which leads to garbage VFIO trace log. > > > Fix it by allocating a dup of vbasedev->na

Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-23 Thread Alex Williamson
On Tue, 23 May 2023 13:00:53 -0400 Matthew Rosato wrote: > On 5/16/23 10:46 PM, Zhenzhong Duan wrote: > > 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 suppo

Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-23 Thread Matthew Rosato
On 5/16/23 10:46 PM, Zhenzhong Duan wrote: > 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 > Signed-off-by: Z

Re: [PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-16 Thread Cédric Le Goater
On 5/17/23 04:46, Zhenzhong Duan wrote: 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 Signed-off-by: Zhenzhong Duan

[PATCH v2] vfio/pci: Fix a use-after-free issue

2023-05-16 Thread Zhenzhong Duan
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 Signed-off-by: Zhenzhong Duan --- v2: "toke" -> "token", Cedric Up