335584f
From: Gerd Hoffmann <kraxel@redhat.com>
335584f
Date: Fri, 28 Apr 2017 09:56:12 +0200
335584f
Subject: [PATCH] audio: release capture buffers
335584f
335584f
AUD_add_capture() allocates two buffers which are never released.
335584f
Add the missing calls to AUD_del_capture().
335584f
335584f
Impact: Allows vnc clients to exhaust host memory by repeatedly
335584f
starting and stopping audio capture.
335584f
335584f
Fixes: CVE-2017-8309
335584f
Cc: P J P <ppandit@redhat.com>
335584f
Cc: Huawei PSIRT <PSIRT@huawei.com>
335584f
Reported-by: "Jiangxin (hunter, SCC)" <jiangxin1@huawei.com>
335584f
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
335584f
Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org>
335584f
Message-id: 20170428075612.9997-1-kraxel@redhat.com
335584f
(cherry picked from commit 3268a845f41253fb55852a8429c32b50f36f349a)
335584f
---
335584f
 audio/audio.c | 2 ++
335584f
 1 file changed, 2 insertions(+)
335584f
335584f
diff --git a/audio/audio.c b/audio/audio.c
335584f
index c8898d8422..beafed209b 100644
335584f
--- a/audio/audio.c
335584f
+++ b/audio/audio.c
335584f
@@ -2028,6 +2028,8 @@ void AUD_del_capture (CaptureVoiceOut *cap, void *cb_opaque)
335584f
                     sw = sw1;
335584f
                 }
335584f
                 QLIST_REMOVE (cap, entries);
335584f
+                g_free (cap->hw.mix_buf);
335584f
+                g_free (cap->buf);
335584f
                 g_free (cap);
335584f
             }
335584f
             return;