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: AS3561 216.34.176.0/20 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (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 EF9482036D for ; Mon, 20 Nov 2017 11:08:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from ) id 1eGjwM-00064U-Tn; Mon, 20 Nov 2017 11:08:38 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eGjwL-00064N-Nq for sox-devel@lists.sourceforge.net; Mon, 20 Nov 2017 11:08:37 +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=8APTmxKx4EUVddDh5j0Ub3BjcV38Q5wYoewm6pW8TTg=; b=bcFiriCR9FhdQvhHHZwdJWsBBX fKlvrXop1iEbip8PF8Bhb+fV8dZpjhGlUhR1YGAg3WUUVkGlNI47F+awRdCvNjFQICSIo3E/30s2y rEhxEj3BJDcxQD0Cfuay43KQZyiuTzlzvrupO5ab9/WDawHv3F/Fyul+wb6/fNIcqNvY=; 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=8APTmxKx4EUVddDh5j0Ub3BjcV38Q5wYoewm6pW8TTg=; b=B8Be7xkbsYvX3gtCxDJnKgq0p8 3+nZ6KVWAY6AYh3e1KIUVqSJLDsyINzqGbxttCVkSds1M5hOjRkhlGyYP5tENPlCFCDsvhRXBQ4rm D2UK2n9o1aUuocUCj6GJJV5dyGjUhn00IXW7clnd6s954Msy99CXyrjLD2PY4L5MKH5U=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) id 1eGjwH-0004IW-EA for sox-devel@lists.sourceforge.net; Mon, 20 Nov 2017 11:08:37 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 9948F17C6E; Mon, 20 Nov 2017 11:08:26 +0000 (GMT) From: Mans Rullgard To: sox-devel@lists.sourceforge.net Date: Mon, 20 Nov 2017 11:05:35 +0000 Message-Id: <20171120110535.14410-1-mans@mansr.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: References: X-Headers-End: 1eGjwH-0004IW-EA Subject: [PATCH] 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 e34286be0a97..197ccd4e5d20 100644 --- a/src/aiff.c +++ b/src/aiff.c @@ -63,7 +63,6 @@ int lsx_aiffstartread(sox_format_t * ft) size_t ssndsize = 0; char *annotation; char *author; - char *comment = NULL; char *copyright; char *nametext; @@ -271,6 +270,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.15.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