qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix a potential Use-after-free in virtio_iommu_handle_command() (v6.


From: Michael S. Tsirkin
Subject: Re: Fix a potential Use-after-free in virtio_iommu_handle_command() (v6.2.0).
Date: Wed, 6 Apr 2022 07:21:07 -0400

On Fri, Feb 25, 2022 at 11:58:43AM +0800, wliang@stu.xidian.edu.cn wrote:
> Hi all,
> 
> Here is a new patch with Signed-off-by tags.
> The old one is wrong for it did't have Signed-off-by tags.
> I am looking forward to your confirmation.
> 
> Thanks,
> Wentao

> From 8ece42bda1099a9a0df584cac2478ec5a6e83924 Mon Sep 17 00:00:00 2001
> From: Wentao_Liang <Wentao_Liang_g@163.com>
> Date: Fri, 25 Feb 2022 11:49:54 +0800
> Subject: [PATCH] Fix a potential Use-after-free in
>  virtio_iommu_handle_command() (v6.2.0).
> 
> Signed-off-by: Wentao_Liang <Wentao_Liang_g@163.com>
> ---
>  hw/virtio/virtio-iommu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
> index aa9c16a17b..a394901347 100644
> --- a/hw/virtio/virtio-iommu.c
> +++ b/hw/virtio/virtio-iommu.c
> @@ -657,6 +657,7 @@ out:
>          virtio_notify(vdev, vq);
>          g_free(elem);
>          g_free(buf);
> +        buf = NULL;
>      }
>  }

I merged this fix, adding the commit log description.
I also note it should be sent inline not as an attachment.

Thanks a lot for the contribution!

> -- 
> 2.25.1
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]