Message ID | 20180723201748.25573-53-mdroth@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41559112E for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 305FE284C9 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24CC1284DC; Mon, 23 Jul 2018 21:08:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7C18284D1 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:08:10 +0000 (UTC) Received: from localhost ([::1]:36638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fhi3t-00040y-Tx for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:08:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJk-0002we-D5 for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJh-0004ht-3i for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:20:28 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:39356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhJg-0004h5-CV; Mon, 23 Jul 2018 16:20:24 -0400 Received: by mail-oi0-x233.google.com with SMTP id d189-v6so3482468oib.6; Mon, 23 Jul 2018 13:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aCrv7zeIBjjc2qT2uEGSz+lqDokwTYED+su3U1iCYzE=; b=iEeEVhSeVu8vb5D/8u8zxPg/qLi4Tg56Et+SdZwti8edWC1G/hpuxTHqokvtm7nmbr gjJaje8Pb68OkkI4PNsD02Syrp9dq0ts96wH8qi9ZBwHbCxa83FQB7eHtd8J6zC0PNEV wf5KNbGyvq7QvLNl57L02bWX+3TGLhGPrQKhsh3brHu9o2qZSnFJTj61atnVXX+aU2/g wItFpD+L3f+69/wkJgRU2TbEN+KX8IpXI/T6wzdnaRKCAcVpL3SaSjK6xrpzzLIMreMR L0jJ3OP6b2tH5iM5TYf636JPtbognYnKLkvxxu4L1kYaJssKgEsBhqX4v/1FzhUOWhzU JW4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=aCrv7zeIBjjc2qT2uEGSz+lqDokwTYED+su3U1iCYzE=; b=U2BrtJUY9bvoQ7pBnioz6K3ClHDxctT3gezvseE5ApkFv+W+tKLASAHC5+uFoOD3FC jB8OSFvMIa5IStOygHgVojHPSuT/lmwnHMKBh3Smb7T+uqwzbuX4yRMugwOEwQGdNm5T 6IShdXjqCecWZ8tWn/X7t7xt8J46renZl9cMBg89iwp2XFu1Si5e06K7uxAqgHmkd0JK glktfayIP4tSpUAXlvko6wa40N+ojG7wg0d7ob5vvMndwbyeolxWexjjH/QMyANM1rfe i1Bb3UJWgioIH0RegZOjwBFpqvW4GLjiCRxgdEW1yRLAU4jRB9OZ72aTEg2ylo7UJ5p/ qrFg== X-Gm-Message-State: AOUpUlGv6H0KTA3ZVOiqVgIW5AxPP4yJuoZrTNsilZKLVZr//zeu6gdX gg9Wa8jLOVL3fux90syUZU+dJaoDnrs= X-Google-Smtp-Source: AAOMgpfJwBY64XHfX3Btag/phUbKbHrKFmQcOjVlEF8oK9l0VhvGkeJg1ky9N0zzp3uZymAB3GLhWw== X-Received: by 2002:aca:856:: with SMTP id 83-v6mr254074oii.333.1532377222997; Mon, 23 Jul 2018 13:20:22 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id s124-v6sm6810178oia.51.2018.07.23.13.20.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:20:21 -0700 (PDT) From: Michael Roth <mdroth@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:01 -0500 Message-Id: <20180723201748.25573-53-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::233 Subject: [Qemu-devel] [PATCH 52/99] vnc: fix use-after-free X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: qemu-stable@nongnu.org, Gerd Hoffmann <kraxel@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Patch Round-up for stable 2.12.1, freeze on 2018-07-30
|
expand
|
diff --git a/ui/vnc.c b/ui/vnc.c index e164eb798c..5526e54f48 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1539,13 +1539,14 @@ gboolean vnc_client_io(QIOChannel *ioc G_GNUC_UNUSED, VncState *vs = opaque; if (condition & G_IO_IN) { if (vnc_client_read(vs) < 0) { - goto end; + /* vs is free()ed here */ + return TRUE; } } if (condition & G_IO_OUT) { vnc_client_write(vs); } -end: + if (vs->disconnecting) { if (vs->ioc_tag != 0) { g_source_remove(vs->ioc_tag);