Skip to content

Commit 334bf33

Browse files
benzeajmberg-intel
authored andcommitted
wifi: cfg80211: avoid leaking stack data into trace
If the structure is not initialized then boolean types might be copied into the tracing data without being initialised. This causes data from the stack to leak into the trace and also triggers a UBSAN failure which can easily be avoided here. Signed-off-by: Benjamin Berg <[email protected]> Link: https://lore.kernel.org/r/20230925171855.a9271ef53b05.I8180bae663984c91a3e036b87f36a640ba409817@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 6130433 commit 334bf33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/wireless/nl80211.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8501,7 +8501,7 @@ static int nl80211_update_mesh_config(struct sk_buff *skb,
85018501
struct cfg80211_registered_device *rdev = info->user_ptr[0];
85028502
struct net_device *dev = info->user_ptr[1];
85038503
struct wireless_dev *wdev = dev->ieee80211_ptr;
8504-
struct mesh_config cfg;
8504+
struct mesh_config cfg = {};
85058505
u32 mask;
85068506
int err;
85078507

0 commit comments

Comments
 (0)