Skip to contentSkip to conversation

wireless/nl80211.c: fix uninitialized variable

PATCH Superseded Alaa Emad 3 participants 4 messages Mar 29, 2021 – Mar 30, 2021 2 messages not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Alaa Emad

author
#0 lore raw

PATCH 1/1 wireless/nl80211.c: fix uninitialized variable

---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
index 775d0c4d86c3..b87ab67ad33d 100644
@@ -210,7 +210,7 @@ static int validate_beacon_head(const struct nlattr *attr,
 	const struct element *elem;
 	const struct ieee80211_mgmt *mgmt = (void *)data;
 	bool s1g_bcn = ieee80211_is_s1g_beacon(mgmt->frame_control);
-	unsigned int fixedlen, hdrlen;
+	unsigned int fixedlen = 0, hdrlen;
 
 	if (s1g_bcn) {
 		fixedlen = offsetof(struct ieee80211_ext,
Signature · 1 line
2.25.1

A message that is not in the archive (sent off-list or not yet received): CAM1DhOgA9DDaGSGFxKgXBONopoo4rLJZheK2jzW_BK-mJrNZKQ@mail.gmail.com

#3 lore raw
Quoted 10 lines · Alaa Emad
Quoted 7 lines · Greg KH
Quoted 2 lines · Alaa Emad

You need to provide some changelog text here, I know I can not take patches without that, maybe the wireless maintainer is more flexible :)

you mean explain what i did , right?

Yes, explain why this change is needed.

thanks,

greg k-h

A message that is not in the archive (sent off-list or not yet received): CAM1DhOjWgN_0GVBeX+pf+9mk_ysaN9pF4agAFUNEkzhxpFR4=w@mail.gmail.com

#5 lore raw

Hi!

Quoted 24 lines · Alaa Emad
Quoted 9 lines · Greg KH
Quoted 1 line · Alaa Emad

On Mon, 29 Mar 2021 at 20:20, Greg KH <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines · Alaa Emad
Quoted 1 line

Reported-by:

[email protected]

Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 9 lines
Quoted 1 line
Quoted 1 line

You need to provide some changelog text here, I know I can not

take

Quoted 1 line
Quoted 1 line

patches without that, maybe the wireless maintainer is more

flexible :)

Quoted 2 lines
Quoted 1 line

  you mean explain what i did , right?

Yes, explain why this change is needed.

Quoted 5 lines


  This change fix  KMSAN uninit-value in net/wireless/nl80211.c:225 , That because of fixedlen variable uninitialized.
   So I initialized it by zero because the code assigned value to it after that and doesn't depend on any stored value in it .

You should add this message to the patch, not just write it to maintainer.

I think, this link might be
useful https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html

Quoted 18 lines
Quoted 5 lines

thanks,

greg k-h

Thanks ,
Alaa

Signature · 7 lines
You received this message because you are subscribed to the Google
Groups "syzkaller" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/syzkaller/CAM1DhOjWgN_0GVBeX%2Bpf%2B9mk_ysaN9pF4agAFUNEkzhxpFR4%3Dw%40mail.gmail.com
.

With regards,
Pavel Skripkin