Patch "wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field" has been added to the 6.8-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

    wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field

to the 6.8-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:
     wifi-mac80211-ensure-beacon-is-non-s1g-prior-to-extr.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 55a0e0c8d0cbfb75ae76194f4d7d540a80c26adb
Author: Richard Kinder <richard.kinder@xxxxxxxxx>
Date:   Thu Mar 28 11:57:25 2024 +1100

    wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field
    
    [ Upstream commit d12b9779cc9ba29d65fbfc728eb8a037871dd331 ]
    
    Logic inside ieee80211_rx_mgmt_beacon accesses the
    mgmt->u.beacon.timestamp field without first checking whether the beacon
    received is non-S1G format.
    
    Fix the problem by checking the beacon is non-S1G format to avoid access
    of the mgmt->u.beacon.timestamp field.
    
    Signed-off-by: Richard Kinder <richard.kinder@xxxxxxxxx>
    Link: https://msgid.link/20240328005725.85355-1-richard.kinder@xxxxxxxxx
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ac0073c8f96f4..df26672fb3383 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -6184,7 +6184,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
 			link->u.mgd.dtim_period = elems->dtim_period;
 		link->u.mgd.have_beacon = true;
 		ifmgd->assoc_data->need_beacon = false;
-		if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY)) {
+		if (ieee80211_hw_check(&local->hw, TIMING_BEACON_ONLY) &&
+		    !ieee80211_is_s1g_beacon(hdr->frame_control)) {
 			link->conf->sync_tsf =
 				le64_to_cpu(mgmt->u.beacon.timestamp);
 			link->conf->sync_device_ts =




[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