linux/net/wireless
Zhao Li cc45f313d8 wifi: cfg80211: preserve hidden-group beacon IE ownership
A hidden-group probe-response entry borrows its beacon IEs from the
group's beacon entry. cfg80211_update_assoc_bss_entry() can pass such
an entry to cfg80211_update_known_bss() when merging scan entries
after a channel switch.

Copying the borrowed beacon_ies into the associated entry gives the
same allocation two owners. Releasing the group's beacon entry can
then leave the associated entry pointing to freed IEs, which are
freed again when that entry is released.

Skip beacon IE replacement when the source entry belongs to a hidden
group. Preserve probe-response processing, the subsequent metadata
updates, and the existing rejection path for conflicting hidden
beacon updates.

Fixes: 0afd425b1b ("cfg80211: fix duplicated scan entries after channel switch")
Reported-by: Yilin Zhang <yilinzhang@moonshot.ai>
Closes: https://lore.kernel.org/linux-wireless/20260901080427.1983015-1-yilinzhang@moonshot.ai/
Assisted-by: Codex:gpt-6-astra
Signed-off-by: Zhao Li <enderaoelyther@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-09-22 10:47:54 +02:00
..
certs wifi: cfg80211: fix certs build to not depend on file order 2023-12-14 09:11:51 +01:00
tests wifi: cfg80211: tests: check BSS lookup failure reasons 2026-07-22 16:11:37 +02:00
.gitignore
ap.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
chan.c wifi: cfg80211: remove 5/10 MHz channel support 2026-06-03 14:07:05 +02:00
core.c Many fixes: 2026-09-16 15:54:56 -07:00
core.h wifi: cfg80211: reduce RTNL holding in regulatory enforcement 2026-09-09 14:51:27 +02:00
debugfs.c wifi: cfg80211: Add parameters to radio-specific debugfs directories 2025-10-27 09:18:41 +01:00
debugfs.h
ethtool.c wifi: cfg80211: Remove the redundant wiphy_dev 2025-09-10 15:05:48 +02:00
ibss.c wifi: cfg80211: ibss: ref BSS entry for joined event 2026-09-09 14:51:27 +02:00
Kconfig wifi: cfg80211: stop exporting wext symbols 2024-10-08 21:53:31 +02:00
Makefile wifi: mac80211, cfg80211: Export michael_mic() and move it to cfg80211 2026-04-08 08:55:15 +02:00
mesh.c wifi: cfg80211: move DFS related members to links[] in wireless_dev 2024-09-06 13:01:05 +02:00
michael-mic.c wifi: cfg80211: Explicitly include <linux/export.h> in michael-mic.c 2026-04-09 08:54:43 +02:00
mlme.c wifi: cfg80211: convert cookie output to input parameter 2026-08-02 17:40:08 +02:00
nl80211.c wifi: cfg80211: fix RTS threshold setting for single-radio PHY 2026-09-21 16:30:26 +02:00
nl80211.h wifi: cfg80211: allow representing NPCA in chandef 2026-05-05 14:49:02 +02:00
ocb.c wifi: cfg80211: remove wdev mutex 2023-09-11 11:27:23 +02:00
of.c wifi: Add SPDX ids to some files in the wireless subsystem 2026-03-06 10:54:23 +01:00
pmsr.c wifi: cfg80211: publish PMSR request before starting the driver 2026-07-28 15:08:57 +02:00
radiotap.c wifi: Add SPDX ids to some files in the wireless subsystem 2026-03-06 10:54:23 +01:00
rdev-ops.h wifi: cfg80211: don't free driver-owned scan requests 2026-09-09 14:51:14 +02:00
reg.c wifi: cfg80211: reduce RTNL holding in regulatory enforcement 2026-09-09 14:51:27 +02:00
reg.h wifi: cfg80211: reduce RTNL holding in regulatory enforcement 2026-09-09 14:51:27 +02:00
scan.c wifi: cfg80211: preserve hidden-group beacon IE ownership 2026-09-22 10:47:54 +02:00
sme.c wifi: cfg80211: use wiphy work for socket owner autodisconnect 2026-07-07 09:27:42 +02:00
sysfs.c Networking changes for 7.1. 2026-04-14 18:36:10 -07:00
sysfs.h
trace.c wifi: Add SPDX ids to some files in the wireless subsystem 2026-03-06 10:54:23 +01:00
trace.h wifi: nl80211/cfg80211: rename probe_client to probe_peer 2026-07-06 12:45:19 +02:00
util.c wifi: cfg80211: ibss: ref BSS entry for joined event 2026-09-09 14:51:27 +02:00
wext-compat.c wifi: cfg80211: clarify and tighten key checks 2026-07-21 19:18:53 +02:00
wext-compat.h Revert "wifi: cfg80211: unexport wireless_nlevent_flush()" 2024-10-09 08:53:01 +02:00
wext-core.c wifi: cfg80211: remove WIPHY_FLAG_DISABLE_WEXT 2026-07-06 12:55:29 +02:00
wext-priv.c wifi: Add SPDX ids to some files in the wireless subsystem 2026-03-06 10:54:23 +01:00
wext-proc.c wifi: Add SPDX ids to some files in the wireless subsystem 2026-03-06 10:54:23 +01:00
wext-sme.c wifi: cfg80211: validate IEs in cfg80211_wext_siwgenie() 2026-07-28 15:07:18 +02:00