lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170727093624.061F96095E@smtp.codeaurora.org>
Date:   Thu, 27 Jul 2017 09:36:24 +0000 (UTC)
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Brian Norris <briannorris@...omium.org>
Cc:     Ganapathi Bhat <gbhat@...vell.com>,
        Nishant Sarmukadam <nishants@...vell.com>,
        <linux-kernel@...r.kernel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Amitkumar Karwar <amitkarwar@...il.com>,
        linux-wireless@...r.kernel.org,
        Brian Norris <briannorris@...omium.org>,
        stable@...r.kernel.org, Avinash Patil <patila@...vell.com>,
        Xinming Hu <huxm@...vell.com>
Subject: Re: mwifiex: correct channel stat buffer overflows

Brian Norris <briannorris@...omium.org> wrote:

> mwifiex records information about various channels as it receives scan
> information. It does this by appending to a buffer that was sized
> to the max number of supported channels on any band, but there are
> numerous problems:
> 
> (a) scans can return info from more than one band (e.g., both 2.4 and 5
>     GHz), so the determined "max" is not large enough
> (b) some firmware appears to return multiple results for a given
>     channel, so the max *really* isn't large enough
> (c) there is no bounds checking when stashing these stats, so problems
>     (a) and (b) can easily lead to buffer overflows
> 
> Let's patch this by setting a slightly-more-correct max (that accounts
> for a combination of both 2.4G and 5G bands) and adding a bounds check
> when writing to our statistics buffer.
> 
> Due to problem (b), we still might not properly report all known survey
> information (e.g., with "iw <dev> survey dump"), since duplicate results
> (or otherwise "larger than expected" results) will cause some
> truncation. But that's a problem for a future bugfix.
> 
> (And because of this known deficiency, only log the excess at the WARN
> level, since that isn't visible by default in this driver and would
> otherwise be a bit too noisy.)
> 
> Fixes: bf35443314ac ("mwifiex: channel statistics support for mwifiex")
> Cc: <stable@...r.kernel.org>
> Cc: Avinash Patil <patila@...vell.com>
> Cc: Xinming Hu <huxm@...vell.com>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Reviewed-by: Ganapathi Bhat <gbhat@...vell.com>

Patch applied to wireless-drivers-next.git, thanks.

4b5dde2d6234 mwifiex: correct channel stat buffer overflows

-- 
https://patchwork.kernel.org/patch/9818269/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ