Patch "wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()" 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: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()

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-ieee80211-fix-ieee80211_mle_basic_sta_prof_size.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 94c3a49b117399e3d3c590d544103fc34ef7b834
Author: Johannes Berg <johannes.berg@xxxxxxxxx>
Date:   Mon Mar 18 18:53:18 2024 +0200

    wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()
    
    [ Upstream commit c121514df0daa800cc500dc2738e0b8a1c54af98 ]
    
    If there was a possibility of an MLE basic STA profile without
    subelements, we might reject it because we account for the one
    octet for sta_info_len twice (it's part of itself, and in the
    fixed portion). Like in ieee80211_mle_reconf_sta_prof_size_ok,
    subtract 1 to adjust that.
    
    When reading the elements we did take this into account, and
    since there are always elements, this never really mattered.
    
    Fixes: 7b6f08771bf6 ("wifi: ieee80211: Support validating ML station profile length")
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Reviewed-by: Ilan Peer <ilan.peer@xxxxxxxxx>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Link: https://msgid.link/20240318184907.00bb0b20ed60.I8c41dd6fc14c4b187ab901dea15ade73c79fb98c@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 83c4d060a5596..b69771a2e4e74 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -5145,7 +5145,7 @@ static inline bool ieee80211_mle_basic_sta_prof_size_ok(const u8 *data,
 		info_len += 1;
 
 	return prof->sta_info_len >= info_len &&
-	       fixed + prof->sta_info_len <= len;
+	       fixed + prof->sta_info_len - 1 <= len;
 }
 
 /**




[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