提交 52dba8d7 编写于 作者: K Karthikeyan Periyasamy 提交者: Johannes Berg

mac80211: reject zero MAC address in add station

This came up in fuzz testing, and really we don't consider
all-zeroes to be a valid MAC address in most places, so
also reject it here to avoid confusion later on.
Signed-off-by: NKarthikeyan Periyasamy <periyasa@codeaurora.org>
Link: https://lore.kernel.org/r/1563959770-21570-1-git-send-email-periyasa@codeaurora.org
[rewrite commit message]
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 50508d94
...@@ -1543,7 +1543,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -1543,7 +1543,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (ether_addr_equal(mac, sdata->vif.addr)) if (ether_addr_equal(mac, sdata->vif.addr))
return -EINVAL; return -EINVAL;
if (is_multicast_ether_addr(mac)) if (!is_valid_ether_addr(mac))
return -EINVAL; return -EINVAL;
sta = sta_info_alloc(sdata, mac, GFP_KERNEL); sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册