Patch "wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()" has been added to the 6.1-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: check for NULL in ieee80211_mle_size_ok()

to the 6.1-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-check-for-null-in-ieee80211_mle_size_.patch
and it can be found in the queue-6.1 subdirectory.

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



commit ddb7971ba746647b69418f9acc96b1ffe57d5eba
Author: Johannes Berg <johannes.berg@xxxxxxxxx>
Date:   Mon Mar 18 18:53:17 2024 +0200

    wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
    
    [ Upstream commit b7793a1a2f370c28b17d9554b58e9dc51afcfcbd ]
    
    For simplicity, we may want to pass a NULL element, and
    while we should then pass also a zero length, just be a
    bit more careful here.
    
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Link: https://msgid.link/20240318184907.4d983653cb8d.Ic3ea99b60c61ac2f7d38cb9fd202a03c97a05601@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 dce105f67b4d8..160230bb1a9ce 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -4608,7 +4608,7 @@ static inline bool ieee80211_mle_size_ok(const u8 *data, u8 len)
 	bool check_common_len = false;
 	u16 control;
 
-	if (len < fixed)
+	if (!data || len < fixed)
 		return false;
 
 	control = le16_to_cpu(mle->control);




[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