Re: [PATCH] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-19 Thread Nicolin Chen
On Thu, Sep 15, 2022 at 11:18:27AM -0600, Alex Williamson wrote: > External email: Use caution opening links or attachments > > > On error, vfio_get_iommu_info() frees and clears *info, but > vfio_connect_container() continues to use the pointer regardless > of the return value. Restructure the

Re: [PATCH] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-17 Thread Philippe Mathieu-Daudé via
On 15/9/22 19:18, Alex Williamson wrote: On error, vfio_get_iommu_info() frees and clears *info, but vfio_connect_container() continues to use the pointer regardless of the return value. Restructure the code such that a failure of this function triggers an error and clean up the remainder of

[PATCH] vfio/common: Fix vfio_iommu_type1_info use after free

2022-09-15 Thread Alex Williamson
On error, vfio_get_iommu_info() frees and clears *info, but vfio_connect_container() continues to use the pointer regardless of the return value. Restructure the code such that a failure of this function triggers an error and clean up the remainder of the function, including updating an outdated