From: Tim Harvey <harvey.tim@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Tim Harvey <harvey.tim@gmail.com>
Subject: [PATCH] mac80211: Fix NULL-pointer deference on ibss merge when not ready
Date: Thu, 9 Dec 2010 08:43:59 -0800 [thread overview]
Message-ID: <1291913039-20801-1-git-send-email-harvey.tim@gmail.com> (raw)
dev_open will eventually call ieee80211_ibss_join which sets up the
skb used for beacons/probe-responses however it is possible to
receive beacons that attempt to merge before this occurs causing
a null pointer dereference.
This occurs quite easily in the presence of adhoc nodes with hidden SSID's
---
net/mac80211/ibss.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 410d104..24e2482 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -86,6 +86,8 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
drv_reset_tsf(local);
skb = ifibss->skb;
+ if (!skb)
+ return; /* not ready to merge yet */
rcu_assign_pointer(ifibss->presp, NULL);
synchronize_rcu();
skb->data = skb->head;
--
1.7.0.4
next reply other threads:[~2010-12-09 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 16:43 Tim Harvey [this message]
2010-12-09 17:19 ` [PATCH] mac80211: Fix NULL-pointer deference on ibss merge when not ready John W. Linville
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=1291913039-20801-1-git-send-email-harvey.tim@gmail.com \
--to=harvey.tim@gmail.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