Patch "wifi: cw1200: Avoid processing an invalid TIM IE" has been added to the 5.10-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: cw1200: Avoid processing an invalid TIM IE

to the 5.10-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-cw1200-avoid-processing-an-invalid-tim-ie.patch
and it can be found in the queue-5.10 subdirectory.

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



commit f2b24523c328e1cddf9f490cf83d1bcb97a44d1e
Author: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>
Date:   Thu Aug 31 11:22:57 2023 -0700

    wifi: cw1200: Avoid processing an invalid TIM IE
    
    [ Upstream commit b7bcea9c27b3d87b54075735c870500123582145 ]
    
    While converting struct ieee80211_tim_ie::virtual_map to be a flexible
    array it was observed that the TIM IE processing in cw1200_rx_cb()
    could potentially process a malformed IE in a manner that could result
    in a buffer over-read. Add logic to verify that the TIM IE length is
    large enough to hold a valid TIM payload before processing it.
    
    Signed-off-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230831-ieee80211_tim_ie-v3-1-e10ff584ab5d@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/st/cw1200/txrx.c b/drivers/net/wireless/st/cw1200/txrx.c
index 400dd585916b5..7ef0886503578 100644
--- a/drivers/net/wireless/st/cw1200/txrx.c
+++ b/drivers/net/wireless/st/cw1200/txrx.c
@@ -1170,7 +1170,7 @@ void cw1200_rx_cb(struct cw1200_common *priv,
 		size_t ies_len = skb->len - (ies - (u8 *)(skb->data));
 
 		tim_ie = cfg80211_find_ie(WLAN_EID_TIM, ies, ies_len);
-		if (tim_ie) {
+		if (tim_ie && tim_ie[1] >= sizeof(struct ieee80211_tim_ie)) {
 			struct ieee80211_tim_ie *tim =
 				(struct ieee80211_tim_ie *)&tim_ie[2];
 




[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