|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH v2] vfio/pci: Fix a use-after-free issue |
| Date: | Wed, 24 May 2023 08:08:20 +0200 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
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 <alex.williamson@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
v2: "toke" -> "token", Cedric
Update with Alex suggested change
hw/vfio/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
| [Prev in Thread] | Current Thread | [Next in Thread] |