mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: wifi: nl80211: fix NULL-ptr deref in offchan check
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. Bug: 254441685 Fixes:7b0a0e3c3a("wifi: cfg80211: do some rework towards MLO link APIs") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230301115906.71bd4803fbb9.Iee39c0f6c2d3a59a8227674dc55d52e38b1090cf@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> (cherry picked from commitf624bb6fad) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: I65e12c70a6142b73e98fa716586271c1ddf4ad56
This commit is contained in:
@@ -8815,7 +8815,7 @@ static bool cfg80211_off_channel_oper_allowed(struct wireless_dev *wdev,
|
|||||||
struct cfg80211_chan_def *chandef;
|
struct cfg80211_chan_def *chandef;
|
||||||
|
|
||||||
chandef = wdev_chandef(wdev, link_id);
|
chandef = wdev_chandef(wdev, link_id);
|
||||||
if (!chandef)
|
if (!chandef || !chandef->chan)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user