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_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,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 6C9741F404 for ; Sat, 28 Apr 2018 11:21:54 +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 1fCNvK-0006Z7-Vp; Sat, 28 Apr 2018 11:21:50 +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 1fCNvK-0006Z0-68 for sox-devel@lists.sourceforge.net; Sat, 28 Apr 2018 11:21:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To: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=U95VhiKXmA1RC0UE8NWcj34R5f+BG11BX8vsm93pj9k=; b=krqzevVM7BgkW8ml2raVeHbgu9 EItXFizJdtLtoKpHZTQoJv8e+GxMfDvoUcoIQgnxm4+ffFBG7jLyCkSoQxfP4fH55Qbn9rhjB4wLY MYot4IRJhmNURSHoBCa5IAzb9IUUXh8qyOjwbzPL7GUM6mUlQJPgV7dMdvhKeEGNORqU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To: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=U95VhiKXmA1RC0UE8NWcj34R5f+BG11BX8vsm93pj9k=; b=DFrAEb6fOYFc7fisBL+9K4tvPN NtqbRt3tZUo71O+wYgsLm/Y5jh1Q+uv/9hJYOdsb/9bDS61kMl1S7Jz8snLTLku/GDtmIyg1JYibA /K2FfjgssSMJC5Q1JJAzHgkQS4gs/aYdusMTE2SjXch2Cdx3xL03Unmj9VB0IckqEJC4=; Received: from mail-qt0-f179.google.com ([209.85.216.179]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1fCNvI-00B6M4-8Q for sox-devel@lists.sourceforge.net; Sat, 28 Apr 2018 11:21:50 +0000 Received: by mail-qt0-f179.google.com with SMTP id d3-v6so5613497qtp.11 for ; Sat, 28 Apr 2018 04:21:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U95VhiKXmA1RC0UE8NWcj34R5f+BG11BX8vsm93pj9k=; b=W4Fb1F8MFg/dxMgMJhC+Ldm7cYGGUZiPpFpMsVwwPiPVWG7lc9zt5y9AEJdSTa9U6F zfIF+X9C/jHxSWdDxbjQ3rXBzediYUhsfuRNNDhKoqYdVt9echnH/3YDV46cEgLcUXKo JPgGG34E4TifxdaTaIv/APOMBqz09/LoPghjkWw7Myc0qNdrMUmBzXm5P86VYY0qYyK8 sgxBFO3m+jyQsRB8SJRqW+4wKX3/APfpfXTKKAp7//1E5ZTwhevSidKeflZ/Csfx6Aep G6VWBpz2VFbs41oKnYj9ZyBfQ7nuIXKCQAxuUpWQ0wqxCBYXza/SgJ/7AgzqNomZWgZO b6xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U95VhiKXmA1RC0UE8NWcj34R5f+BG11BX8vsm93pj9k=; b=lsPsktEGiOgO2PTxPzhQvwjtGLZozyOJFTi6GZMj4TgqZJdjpsK6LD978mOHNGndvc RBaLbgu01luIdaJ4aZW5XfX6rjrDI3BH8jj38UZmohblYtvPozrwEDQlj0PoncGmSZ0c zatTaUUhfmMS6z8SYIYqT8Qyo2rr6mkyHayc8EK+ubk5oV10vTXye8bRop5zfnssqA9S dlkHjlQAa8BJ6O39di6wB0nJ5+3CsQWbh4DMWbxELQHRMXihm5v372v8ahKxEWZuQaC0 6XGPj3JCzV66BRWB160Tr8hMbYZkzdSClYpUfc1jheYFHywt4ovtW0DqVkz5pB8zOog2 Zd3w== X-Gm-Message-State: ALQs6tBHAKWtNwTXx97hrwftZIisqZFDbwitBdr32yHoy3PmnkVrhdPu +vUku8fA4ePJr3OYbqfzq7Lmrnmbn16IMpTkW7c= X-Google-Smtp-Source: AB8JxZoPYWRev64L4l94PP+pEM8eB6i3Cnl4s8PXyYfSxqYH5yrhfJLZBqGeMd/DFv8dC/zS3aGmXLCZ8jqrOnGlaiA= X-Received: by 2002:aed:36e3:: with SMTP id f90-v6mr5468191qtb.115.1524914502107; Sat, 28 Apr 2018 04:21:42 -0700 (PDT) MIME-Version: 1.0 References: <20180426131552.29249-1-mans@mansr.com> <20180426131552.29249-7-mans@mansr.com> <20180428003440.GB11098@dcvr> In-Reply-To: From: Sonny Ray Date: Sat, 28 Apr 2018 11:21:31 +0000 Message-ID: To: sox-devel@lists.sourceforge.net X-Headers-End: 1fCNvI-00B6M4-8Q Subject: Re: [PATCH 6/8] adpcm: fix stack overflow with >4 channels (CVE-2017-15372) 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 Cc: normalperson@yhbt.net Content-Type: multipart/mixed; boundary="===============5304904599750575116==" Errors-To: sox-devel-bounces@lists.sourceforge.net --===============5304904599750575116== Content-Type: multipart/alternative; boundary="000000000000360a99056ae6d324" --000000000000360a99056ae6d324 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm using sox for a scalable multitrack recording use case. If we're going to put a global cap, can it be something absurd to human eyes, like 256 channels or something? Or will that not resolve the bug? On Sat, Apr 28, 2018 at 6:55 AM M=C3=A5ns Rullg=C3=A5rd wr= ote: > Eric Wong writes: > > > Mans Rullgard wrote: > >> +extern void *lsx_ms_adpcm_alloc(unsigned chans) > >> +{ > >> + return lsx_malloc(chans * sizeof(MsState_t)); > > > > Initially I thought this might overflow, but it appears channels > > is capped to UINT16_MAX by the previous patch. > > > > On a side note, lsx_valloc could probably be updated to do > > overflow checking and we could use it here to make future > > auditing/review easier. > > We should probably also put a global cap on number of channels. > > -- > M=C3=A5ns Rullg=C3=A5rd > > > -------------------------------------------------------------------------= ----- > 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 > --000000000000360a99056ae6d324 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm using sox for a scalable multitrack recording use = case. If we're going to put a global cap, can it be something absurd to= human eyes, like 256 channels or something? Or will that not resolve the b= ug?

On Sat, Apr 28, 20= 18 at 6:55 AM M=C3=A5ns Rullg=C3=A5rd <mans@mansr.com> wrote:
Eric= Wong <normal= person@yhbt.net> writes:

> Mans Rullgard <= mans@mansr.com> wrote:
>> +extern void *lsx_ms_adpcm_alloc(unsigned chans)
>> +{
>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 return lsx_malloc(chans * sizeof(MsSt= ate_t));
>
> Initially I thought this might overflow, but it appears channels
> is capped to UINT16_MAX by the previous patch.
>
> On a side note, lsx_valloc could probably be updated to do
> overflow checking and we could use it here to make future
> auditing/review easier.

We should probably also put a global cap on number of channels.

--
M=C3=A5ns Rullg=C3=A5rd

---------------------------------------------------------------------------= ---
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-de= vel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-devel
--000000000000360a99056ae6d324-- --===============5304904599750575116== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============5304904599750575116== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel --===============5304904599750575116==--