Patch "wifi: nl80211: fix NULL-ptr deref in offchan check" 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: nl80211: fix NULL-ptr deref in offchan check

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-nl80211-fix-null-ptr-deref-in-offchan-check.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 5cd5dfcc1d2078f0f07430cc3b314495cc4f7dd1
Author: Johannes Berg <johannes.berg@xxxxxxxxx>
Date:   Wed Mar 1 12:09:29 2023 +0200

    wifi: nl80211: fix NULL-ptr deref in offchan check
    
    [ Upstream commit f624bb6fad23df3270580b4fcef415c6e7bf7705 ]
    
    If, e.g. in AP mode, the link was already created by userspace
    but not activated yet, it has a chandef but the chandef isn't
    valid and has no channel. Check for this and ignore this link.
    
    Fixes: 7b0a0e3c3a88 ("wifi: cfg80211: do some rework towards MLO link APIs")
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230301115906.71bd4803fbb9.Iee39c0f6c2d3a59a8227674dc55d52e38b1090cf@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4d4de49f7ab65..4c6748aa6a1c1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8815,7 +8815,7 @@ static bool cfg80211_off_channel_oper_allowed(struct wireless_dev *wdev,
 		struct cfg80211_chan_def *chandef;
 
 		chandef = wdev_chandef(wdev, link_id);
-		if (!chandef)
+		if (!chandef || !chandef->chan)
 			continue;
 
 		/*



[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