From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 27A1D1F424 for ; Thu, 26 Apr 2018 13:16:38 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fBglH-0001Im-4Z; Thu, 26 Apr 2018 13:16:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fBglG-0001IO-2R for sox-devel@lists.sourceforge.net; Thu, 26 Apr 2018 13:16:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:To: From:Sender:Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dtLkQNEmkX98M5X6lLr2/nWy9eOdDlS7xmtTRopPMxk=; b=iFbP+84V/RZJHz5w2G9oFAEckL S+y7KB1suYyiYJztnquHiNJRLFqc1tfUKnsKbnK2Mfh5wMu4jlIzsMPeuoKbv25NmArwUr2aIyfLH mjYHR6JQOoqPGPoZNQ4n6nEDp0ADCLWzCDOFPlHDJEm4l7UP+wRR0n8Rys5gNBZoETS8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc :MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dtLkQNEmkX98M5X6lLr2/nWy9eOdDlS7xmtTRopPMxk=; b=R2wmLEopbhle0oshbH/gI6gRFH Ff85b7CMGso8eqWrs396+9ohKq2gFXPRnQEp4kd53BONXq7e37E129bpBteCMPn0eS6WTKc0d5yhy tWGE+kkCVJywmR7FFK6YLC7RMTZQQthBKONaFEKBgeHD2MS6ZtjgcY4qBHRVJJAo2p9o=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fBglB-008SH3-6Y for sox-devel@lists.sourceforge.net; Thu, 26 Apr 2018 13:16:33 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 6D86D16409; Thu, 26 Apr 2018 14:16:11 +0100 (BST) From: Mans Rullgard To: sox-devel@lists.sourceforge.net Date: Thu, 26 Apr 2018 14:15:51 +0100 Message-Id: <20180426131552.29249-8-mans@mansr.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180426131552.29249-1-mans@mansr.com> References: <20180426131552.29249-1-mans@mansr.com> X-Headers-End: 1fBglB-008SH3-6Y Subject: [PATCH 7/8] aiff: fix crash on empty comment chunk (CVE-2017-15642) X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-devel@lists.sourceforge.net MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-devel-bounces@lists.sourceforge.net This fixes a use after free and double free if an empty comment chunk follows a non-empty one. --- src/aiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aiff.c b/src/aiff.c index 240d2e1fdf63..11ddb542ca85 100644 --- a/src/aiff.c +++ b/src/aiff.c @@ -62,7 +62,6 @@ int lsx_aiffstartread(sox_format_t * ft) size_t ssndsize = 0; char *annotation; char *author; - char *comment = NULL; char *copyright; char *nametext; @@ -270,6 +269,7 @@ int lsx_aiffstartread(sox_format_t * ft) free(annotation); } else if (strncmp(buf, "COMT", (size_t)4) == 0) { + char *comment = NULL; rc = commentChunk(&comment, "Comment:", ft); if (rc) { /* Fail already called in function */ -- 2.17.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel