Skip to content

Commit

Permalink
mac80211: reject zero MAC address in add station
Browse files Browse the repository at this point in the history
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: Karthikeyan 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: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Karthikeyan Periyasamy authored and Johannes Berg committed Jul 31, 2019
1 parent 50508d9 commit 52dba8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (ether_addr_equal(mac, sdata->vif.addr))
return -EINVAL;

if (is_multicast_ether_addr(mac))
if (!is_valid_ether_addr(mac))
return -EINVAL;

sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
Expand Down

0 comments on commit 52dba8d

Please sign in to comment.