From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Kalle Valo <kalle.valo@iki.fi>,
Christian Lamparter <chunkeey@web.de>
Subject: [PATCH 2.6.30] mac80211: validate TIM IE length
Date: Fri, 17 Apr 2009 00:54:23 +0200 [thread overview]
Message-ID: <1239922463.26575.40.camel@johannes.local> (raw)
In-Reply-To: <1239920291.26575.37.camel@johannes.local> (sfid-20090417_001849_051533_DC947D05)
The TIM IE must not be shorter than 4 bytes, so verify that
when parsing it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
Ok the other version doesn't apply to .30 -- only to a tree that already
has my other patches. This is going to create merge conflicts, but they
should be easy to resolve...
net/mac80211/mlme.c | 3 +++
1 file changed, 3 insertions(+)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-04-17 00:50:23.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-04-17 00:52:09.000000000 +0200
@@ -528,6 +528,9 @@ static bool ieee80211_check_tim(struct i
u8 index, indexn1, indexn2;
struct ieee80211_tim_ie *tim = (struct ieee80211_tim_ie *) elems->tim;
+ if (unlikely(!tim || elems->tim_len < 4))
+ return false;
+
aid &= 0x3fff;
index = aid / 8;
mask = 1 << (aid & 7);
next prev parent reply other threads:[~2009-04-16 22:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 22:18 [PATCH 2.6.30!] mac80211: validate TIM IE length Johannes Berg
2009-04-16 22:21 ` Johannes Berg
2009-04-16 22:54 ` Johannes Berg [this message]
2009-04-18 15:33 ` [PATCH 2.6.31 v2] " Johannes Berg
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=1239922463.26575.40.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=chunkeey@web.de \
--cc=kalle.valo@iki.fi \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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