79b470
From 1b7381da7db7092bf774779a610f153532efa5d4 Mon Sep 17 00:00:00 2001
79b470
Message-Id: <1b7381da7db7092bf774779a610f153532efa5d4@dist-git>
79b470
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
79b470
Date: Tue, 29 Sep 2020 14:43:06 +0200
79b470
Subject: [PATCH] qemu: agent: set ifname to NULL after freeing
79b470
MIME-Version: 1.0
79b470
Content-Type: text/plain; charset=UTF-8
79b470
Content-Transfer-Encoding: 8bit
79b470
79b470
CVE-2020-25637
79b470
79b470
Signed-off-by: Ján Tomko <jtomko@redhat.com>
79b470
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
79b470
Fixes: 0977b8aa071de550e1a013d35e2c72615e65d520
79b470
Reviewed-by: Mauro Matteo Cascella <mcascell@redhat.com>
79b470
(cherry picked from commit a63b48c5ecef077bf0f909a85f453a605600cf05)
79b470
Signed-off-by: Ján Tomko <jtomko@redhat.com>
79b470
79b470
Conflicts: src/qemu/qemu_agent.c
79b470
    Commit ee247e1d which switched virStringListFree
79b470
    to g_strfreev is missing downstream.
79b470
Message-Id: <01acbf07b5b165b89cc73a127fe7bda666bdf235.1601383236.git.jtomko@redhat.com>
79b470
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
79b470
---
79b470
 src/qemu/qemu_agent.c | 1 +
79b470
 1 file changed, 1 insertion(+)
79b470
79b470
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
79b470
index f13126aeee..968534b594 100644
79b470
--- a/src/qemu/qemu_agent.c
79b470
+++ b/src/qemu/qemu_agent.c
79b470
@@ -2192,6 +2192,7 @@ qemuAgentGetInterfaces(qemuAgentPtr mon,
79b470
 
79b470
         /* Has to be freed for each interface. */
79b470
         virStringListFree(ifname);
79b470
+        ifname = NULL;
79b470
 
79b470
         /* as well as IP address which - moreover -
79b470
          * can be presented multiple times */
79b470
-- 
79b470
2.28.0
79b470