Linux-Wireless Archive on
 help / color / Atom feed
From: Johannes Berg <>
Subject: Re: [PATCH] mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
Date: Wed, 28 Aug 2019 22:36:58 +0200
Message-ID: <> (raw)
In-Reply-To: <> (sfid-20190828_040827_580483_8289AFC7)

First of all, the subject doesn't make a lot of sense?

Secondly, for a fix the code is fine I guess, but:

>  	rate_ie = (void *)cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES,
>  					   params->beacon.tail,
>  					   params->beacon.tail_len);

consider removing struct ieee_types_header from your driver, and using
struct element from <linux/ieee80211.h> instead.

This also comes with cfg80211_find_elem() that returns a suitably typed
pointer, so you don't need any casts.

>  	if (vendor_ie) {
>  		wmm_ie = vendor_ie;
> +		if (*(wmm_ie + 1) > sizeof(struct mwifiex_types_wmm_info))
> +			return;

and using it here would be a whole lot easier to understand too :)


  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  2:07 huangwenabc
2019-08-28  3:01 ` [EXT] " Ganapathi Bhat
2019-08-28 20:36 ` Johannes Berg [this message]
2019-08-28 20:37   ` Johannes Berg
2019-09-03 13:50 ` Kalle Valo

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Wireless Archive on

Archives are clonable:
	git clone --mirror linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ \
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone