Patch "wifi: avoid offset calculation on NULL pointer" has been added to the 6.6-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: avoid offset calculation on NULL pointer

to the 6.6-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-avoid-offset-calculation-on-null-pointer.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 15b2424ce39279195fc38b41da6b898cd0ceadf7
Author: Michael-CY Lee <michael-cy.lee@xxxxxxxxxxxx>
Date:   Wed Nov 22 11:02:37 2023 +0800

    wifi: avoid offset calculation on NULL pointer
    
    [ Upstream commit ef5828805842204dd0259ecfc132b5916c8a77ae ]
    
    ieee80211_he_6ghz_oper() can be passed a NULL pointer
    and checks for that, but already did the calculation
    to inside of it before. Move it after the check.
    
    Signed-off-by: Michael-CY Lee <michael-cy.lee@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231122030237.31276-1-michael-cy.lee@xxxxxxxxxxxx
    [rewrite commit message]
    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 2b0a73cb7cbb..2fa186258e35 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2790,12 +2790,14 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)
 static inline const struct ieee80211_he_6ghz_oper *
 ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper)
 {
-	const u8 *ret = (const void *)&he_oper->optional;
+	const u8 *ret;
 	u32 he_oper_params;
 
 	if (!he_oper)
 		return NULL;
 
+	ret = (const void *)&he_oper->optional;
+
 	he_oper_params = le32_to_cpu(he_oper->he_oper_params);
 
 	if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO))




[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