Patch "mac80211: Drop frames from invalid MAC address in ad-hoc mode" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mac80211: Drop frames from invalid MAC address in ad-hoc mode

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mac80211-drop-frames-from-invalid-mac-address-in-ad-.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 441a952c55baf19f06e718e48ac832c5b892aeee
Author: YueHaibing <yuehaibing@xxxxxxxxxx>
Date:   Fri Aug 27 22:42:30 2021 +0800

    mac80211: Drop frames from invalid MAC address in ad-hoc mode
    
    [ Upstream commit a6555f844549cd190eb060daef595f94d3de1582 ]
    
    WARNING: CPU: 1 PID: 9 at net/mac80211/sta_info.c:554
    sta_info_insert_rcu+0x121/0x12a0
    Modules linked in:
    CPU: 1 PID: 9 Comm: kworker/u8:1 Not tainted 5.14.0-rc7+ #253
    Workqueue: phy3 ieee80211_iface_work
    RIP: 0010:sta_info_insert_rcu+0x121/0x12a0
    ...
    Call Trace:
     ieee80211_ibss_finish_sta+0xbc/0x170
     ieee80211_ibss_work+0x13f/0x7d0
     ieee80211_iface_work+0x37a/0x500
     process_one_work+0x357/0x850
     worker_thread+0x41/0x4d0
    
    If an Ad-Hoc node receives packets with invalid source MAC address,
    it hits a WARN_ON in sta_info_insert_check(), this can spam the log.
    
    Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210827144230.39944-1-yuehaibing@xxxxxxxxxx
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 2563473b5cf1..e023e307c0c3 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -4053,7 +4053,8 @@ static bool ieee80211_accept_frame(struct ieee80211_rx_data *rx)
 		if (!bssid)
 			return false;
 		if (ether_addr_equal(sdata->vif.addr, hdr->addr2) ||
-		    ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2))
+		    ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2) ||
+		    !is_valid_ether_addr(hdr->addr2))
 			return false;
 		if (ieee80211_is_beacon(hdr->frame_control))
 			return true;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux