From: Johannes Berg Date: Wed, 9 Apr 2014 20:32:16 +0000 (+0200) Subject: cfg80211: reject invalid IBSS BSSIDs in wext compat code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=74f8274103b78bf227711e655656dc737ad2bda7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git cfg80211: reject invalid IBSS BSSIDs in wext compat code Don't allow using a multicast address as the BSSID, that isn't a valid configuration. Signed-off-by: Johannes Berg --- diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index e16cc132c58a..f55f6ffcfcec 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c @@ -481,6 +481,9 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev, if (is_zero_ether_addr(bssid) || is_broadcast_ether_addr(bssid)) bssid = NULL; + if (bssid && !is_valid_ether_addr(bssid)) + return -EINVAL; + /* both automatic */ if (!bssid && !wdev->wext.ibss.bssid) return 0;