qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: wliang@stu.xidian.edu.cn
To: eric.auger@redhat.com
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: Fix a potential Use-after-free in virtio_iommu_handle_command() (v6.2.0).
Date: Fri, 25 Feb 2022 11:58:43 +0800 (GMT+08:00)	[thread overview]
Message-ID: <26faef1d.aa6.17f2f07f0b4.Coremail.wliang@stu.xidian.edu.cn> (raw)
In-Reply-To: <a300d2f3-e545-7793-2601-fec1cbbd601a@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-a-potential-Use-after-free-in-virtio_iommu_handl.patch --]
[-- Type: text/x-patch;  name=0001-Fix-a-potential-Use-after-free-in-virtio_iommu_handl.patch, Size: 680 bytes --]

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;
     }
 }
 
-- 
2.25.1


  reply	other threads:[~2022-02-25  4:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 14:36 Fix a potential Use-after-free in virtio_iommu_handle_command() (v6.2.0) wliang
2022-02-23 16:02 ` Thomas Huth
2022-02-23 16:18   ` Philippe Mathieu-Daudé
2022-02-24  1:49     ` wliang
2022-02-23 17:39   ` Eric Auger
2022-02-25  3:58     ` wliang [this message]
2022-04-06 11:21       ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26faef1d.aa6.17f2f07f0b4.Coremail.wliang@stu.xidian.edu.cn \
    --to=wliang@stu.xidian.edu.cn \
    --cc=eric.auger@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).