aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-16 07:45:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-19 16:10:13 -0400
commit39193498913f82dd7e484aa908843ca4114c3b0c (patch)
tree14951970eaaa7c66a1e6b2f820b5f7cae8d2280a /net/wireless
parentbbb5574224168ef62c8549535c0d0a99e989ecf3 (diff)
cfg80211: validate IBSS BSSID
The IBSS BSSID is never validated, so an invalid one might end up being used. Fix this by rejecting invalid configuration. Reported-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 11089541bb03..430b432bc3f0 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4527,8 +4527,12 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
4527 4527
4528 wiphy = &rdev->wiphy; 4528 wiphy = &rdev->wiphy;
4529 4529
4530 if (info->attrs[NL80211_ATTR_MAC]) 4530 if (info->attrs[NL80211_ATTR_MAC]) {
4531 ibss.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]); 4531 ibss.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]);
4532
4533 if (!is_valid_ether_addr(ibss.bssid))
4534 return -EINVAL;
4535 }
4532 ibss.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]); 4536 ibss.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);
4533 ibss.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]); 4537 ibss.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]);
4534 4538