From: Johannes Berg <johannes@sipsolutions.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: checking for integer overflows in cfg80211_roamed_bss()
Date: Wed, 29 Feb 2012 09:28:04 +0100 [thread overview]
Message-ID: <1330504084.4714.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20120229063841.GG18031@elgon.mountain> (sfid-20120229_073850_391425_67F24184)
On Wed, 2012-02-29 at 09:38 +0300, Dan Carpenter wrote:
> I just sent a patch for a places that didn't cap "req_ie_len" and
> "resp_ie_len" properly leading to integer overflows in
> cfg80211_roamed_bss(). If there was a good way, I'd like to cap those
> values inside cfg80211_roamed_bss() as well. What is a good limit to
> use?
>
> devel/net/wireless/sme.c
> 653
> 654 ev = kzalloc(sizeof(*ev) + req_ie_len + resp_ie_len, gfp);
> 655 if (!ev) {
> 656 cfg80211_put_bss(bss);
> 657 return;
> 658 }
> 659
Probably IEEE80211_MAX_DATA_LEN, there's no way all the IEs could ever
be longer than that combined, at least for now :)
johannes
prev parent reply other threads:[~2012-02-29 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 6:38 checking for integer overflows in cfg80211_roamed_bss() Dan Carpenter
2012-02-29 8:28 ` Johannes Berg [this message]
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=1330504084.4714.0.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.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).