Patch "wifi: rtw89: check return value of ieee80211_probereq_get() for RNR" has been added to the 6.12-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: rtw89: check return value of ieee80211_probereq_get() for RNR

to the 6.12-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-rtw89-check-return-value-of-ieee80211_probereq_.patch
and it can be found in the queue-6.12 subdirectory.

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



commit dee9960e13ee47e3cec13ad994a6a3e970ddd975
Author: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Date:   Thu Sep 19 16:12:14 2024 +0800

    wifi: rtw89: check return value of ieee80211_probereq_get() for RNR
    
    [ Upstream commit 630d5d8f2bf6b340202b6bc2c05d794bbd8e4c1c ]
    
    The return value of ieee80211_probereq_get() might be NULL, so check it
    before using to avoid NULL pointer access.
    
    Addresses-Coverity-ID: 1529805 ("Dereference null return value")
    
    Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Link: https://patch.msgid.link/20240919081216.28505-2-pkshih@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 13a7c39ceb6f5..e6bceef691e9b 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -6074,6 +6074,9 @@ static int rtw89_update_6ghz_rnr_chan(struct rtw89_dev *rtwdev,
 
 		skb = ieee80211_probereq_get(rtwdev->hw, rtwvif_link->mac_addr,
 					     NULL, 0, req->ie_len);
+		if (!skb)
+			return -ENOMEM;
+
 		skb_put_data(skb, ies->ies[NL80211_BAND_6GHZ], ies->len[NL80211_BAND_6GHZ]);
 		skb_put_data(skb, ies->common_ies, ies->common_ie_len);
 		hdr = (struct ieee80211_hdr *)skb->data;




[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