sst-linux/net/wireless
Miri Korenblit 0272d4af7f wifi: cfg80211: cancel wiphy_work before freeing wiphy
[ Upstream commit 72d520476a2fab6f3489e8388ab524985d6c4b90 ]

A wiphy_work can be queued from the moment the wiphy is allocated and
initialized (i.e. wiphy_new_nm). When a wiphy_work is queued, the
rdev::wiphy_work is getting queued.

If wiphy_free is called before the rdev::wiphy_work had a chance to run,
the wiphy memory will be freed, and then when it eventally gets to run
it'll use invalid memory.

Fix this by canceling the work before freeing the wiphy.

Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20250306123626.efd1d19f6e07.I48229f96f4067ef73f5b87302335e2fd750136c9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-28 21:58:48 +01:00
..
certs
.gitignore
ap.c
chan.c
core.c wifi: cfg80211: cancel wiphy_work before freeing wiphy 2025-03-28 21:58:48 +01:00
core.h
debugfs.c
debugfs.h
ethtool.c
ibss.c
Kconfig
lib80211_crypt_ccmp.c
lib80211_crypt_tkip.c
lib80211_crypt_wep.c
lib80211.c
Makefile
mesh.c
mlme.c
nl80211.c wifi: nl80211: reject cooked mode if it is set along with other flags 2025-03-13 12:53:14 +01:00
nl80211.h
ocb.c
of.c
pmsr.c
radiotap.c
rdev-ops.h
reg.c wifi: cfg80211: regulatory: improve invalid hints checking 2025-03-13 12:53:14 +01:00
reg.h
scan.c wifi: cfg80211: adjust allocation of colocated AP data 2025-02-21 13:49:05 +01:00
sme.c
sysfs.c
sysfs.h
trace.c
trace.h
util.c
wext-compat.c
wext-compat.h
wext-core.c
wext-priv.c
wext-proc.c
wext-sme.c
wext-spy.c