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 0399E1F424 for ; Thu, 26 Apr 2018 13:16:31 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fBgl6-0005eF-27; Thu, 26 Apr 2018 13:16:24 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fBgl4-0005dg-2A for sox-devel@lists.sourceforge.net; Thu, 26 Apr 2018 13:16:22 +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=gEEfGM2y3HRAsWZbaoZaamXJGwoQDeZUTznzFDLr3TU=; b=VD4LtugmvJzaSvV8NK8cXm46e4 /8nF8NpfQHlpnRq7vTrcttoPY1K0opVsPqB++2/capg/v88jxQ1//AAIz39TzRDt6eumMsnSmdH2G QZjpT+NQCOfAiNn4efkN3mWSCpTcyaOG2aX6en2OH4Owhj88k5bCIb+VSN0HJXE4BFwc=; 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=gEEfGM2y3HRAsWZbaoZaamXJGwoQDeZUTznzFDLr3TU=; b=PsrOuwdea7KEUxkqKhWkgeM7E4 uFHLK8KJSvzBDUiqlUgZNQsbzyPi0e5cKWhVfkGy/4L01q3KaYcu6jL+mNM9PG35vTf9DBvXiWfoA KN0LXXwOcuwj6unqOBZqcbb8vqzxOqB7UsNmAl4QGrloLdrSwxRfaRGcz2tsR+sCYiIQ=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1fBgl2-00CoaF-3q for sox-devel@lists.sourceforge.net; Thu, 26 Apr 2018 13:16:21 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 5F87A16404; 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:46 +0100 Message-Id: <20180426131552.29249-3-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: 1fBgl2-00CoaF-3q Subject: [PATCH 2/8] hcom: fix crash on input with corrupt dictionary (CVE-2017-11358) 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 --- src/hcom.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hcom.c b/src/hcom.c index e76820e9333f..ee28cba24218 100644 --- a/src/hcom.c +++ b/src/hcom.c @@ -150,6 +150,11 @@ static int startread(sox_format_t * ft) lsx_debug("%d %d", p->dictionary[i].dict_leftson, p->dictionary[i].dict_rightson); + if ((unsigned) p->dictionary[i].dict_leftson >= dictsize || + (unsigned) p->dictionary[i].dict_rightson >= dictsize) { + lsx_fail_errno(ft, SOX_EHDR, "Invalid dictionary"); + return SOX_EOF; + } } rc = lsx_skipbytes(ft, (size_t) 1); /* skip pad byte */ if (rc) -- 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