Skip to content

Commit d7a54d0

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: mac80211: always initialize sdata::key_list
This is currently not initialized for a virtual monitor, leading to a NULL pointer dereference when - for example - iterating over all the keys of all the vifs. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250709233400.8dcefe578497.I4c90a00ae3256520e063199d7f6f2580d5451acf@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent a066917 commit d7a54d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/mac80211/iface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,8 @@ static void ieee80211_sdata_init(struct ieee80211_local *local,
11501150
{
11511151
sdata->local = local;
11521152

1153+
INIT_LIST_HEAD(&sdata->key_list);
1154+
11531155
/*
11541156
* Initialize the default link, so we can use link_id 0 for non-MLD,
11551157
* and that continues to work for non-MLD-aware drivers that use just
@@ -2210,8 +2212,6 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
22102212

22112213
ieee80211_init_frag_cache(&sdata->frags);
22122214

2213-
INIT_LIST_HEAD(&sdata->key_list);
2214-
22152215
wiphy_delayed_work_init(&sdata->dec_tailroom_needed_wk,
22162216
ieee80211_delayed_tailroom_dec);
22172217

0 commit comments

Comments
 (0)