]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: nl80211: fix NULL-ptr deref in offchan check
authorJohannes Berg <johannes.berg@intel.com>
Wed, 1 Mar 2023 10:09:29 +0000 (12:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:43 +0000 (13:33 +0100)
commit9a42bd25738d4948cc92be3ea8bb797a1b2c79db
tree6e86f6254bfffbabb8747a503f87f4ec512c34b4
parentaccbcc5c816fa5893108cef10ea6feddd2660f67
wifi: nl80211: fix NULL-ptr deref in offchan check

[ Upstream commit e0015f8c26797afc6fb7e5419da9e3ea245cd387 ]

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: d624b47de5de ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/nl80211.c