linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"freenerguo(郭大兴)" <freenerguo@tencent.com>,
	"Franky Lin" <franky.lin@broadcom.com>,
	"Hante Meuleman" <hante.meuleman@broadcom.com>,
	"Chi-Hsien Lin" <Chi-Hsien.Lin@cypress.com>,
	"Wright Feng" <Wright.Feng@cypress.com>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"Pieter-Paul Giesberts" <pieter-paul.giesberts@broadcom.com>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"brcm80211-dev-list.pdl@broadcom.com"
	<brcm80211-dev-list.pdl@broadcom.com>,
	brcm80211-dev-list <brcm80211-dev-list@cypress.com>,
	"security@kernel.org" <security@kernel.org>
Subject: Re: [PATCH] brcmfmac: buffer overflow in brcmf_cfg80211_mgmt_tx()
Date: Fri, 7 Jul 2017 13:19:31 +0200	[thread overview]
Message-ID: <36f255e3-60e6-3ecc-8a47-90ec7df97ec6@broadcom.com> (raw)
In-Reply-To: <20170707101939.3mgdgc4pvjg6dyyx@mwanda>

On 07-07-17 12:19, Dan Carpenter wrote:
> Speaking of underflows:
> 
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
>   4913          if (ieee80211_is_probe_resp(mgmt->frame_control)) {
>   4914                  /* Right now the only reason to get a probe response */
>   4915                  /* is for p2p listen response or for p2p GO from     */
>   4916                  /* wpa_supplicant. Unfortunately the probe is send   */
>   4917                  /* on primary ndev, while dongle wants it on the p2p */
>   4918                  /* vif. Since this is only reason for a probe        */
>   4919                  /* response to be sent, the vif is taken from cfg.   */
>   4920                  /* If ever desired to send proberesp for non p2p     */
>   4921                  /* response then data should be checked for          */
>   4922                  /* "DIRECT-". Note in future supplicant will take    */
>   4923                  /* dedicated p2p wdev to do this and then this 'hack'*/
>   4924                  /* is not needed anymore.                            */
>   4925                  ie_offset =  DOT11_MGMT_HDR_LEN +
>   4926                               DOT11_BCN_PRB_FIXED_LEN;
>   4927                  ie_len = len - ie_offset;
>                                  ^^^^^^^^^^^^^^^
> This can underflow.  It's harmless, but it's annoying for me as a static
> checker person because this is the line where I'd like to print a
> warning but everyone will complain it's a "false positive".

Feel free to provide such a patch.

Regards,
Arend

  reply	other threads:[~2017-07-07 11:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <88f27bfd328f4ccdb0d6b7ff7e710819@MWHPR06MB3230.namprd06.prod.outlook.com>
2017-07-06 17:11 ` [PATCH] brcmfmac: buffer overflow in brcmf_cfg80211_mgmt_tx() Arend van Spriel
2017-07-06 22:32   ` Linus Torvalds
2017-07-07  8:28     ` Arend van Spriel
2017-07-07  8:41       ` Kalle Valo
2017-07-07  8:40     ` Kalle Valo
2017-07-07  8:49       ` Dan Carpenter
2017-07-07  9:19         ` Arend van Spriel
2017-07-07  8:46     ` Dan Carpenter
2017-07-07  9:24       ` Arend van Spriel
2017-07-07 10:19         ` Dan Carpenter
2017-07-07 11:19           ` Arend van Spriel [this message]
2017-07-07 11:21         ` Arend van Spriel
     [not found] <76EE61108481FC4BBFFF404FA986AA6719B8EA26@EXMBX-TJ001.tencent.com>
2017-07-06  8:41 ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36f255e3-60e6-3ecc-8a47-90ec7df97ec6@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=Chi-Hsien.Lin@cypress.com \
    --cc=Wright.Feng@cypress.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=dan.carpenter@oracle.com \
    --cc=franky.lin@broadcom.com \
    --cc=freenerguo@tencent.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pieter-paul.giesberts@broadcom.com \
    --cc=rafal@milecki.pl \
    --cc=security@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).