From: Greg KH <gregkh@linuxfoundation.org>
To: Alaa Emad <alaaemadhossney.ae@gmail.com>
Cc: johannes@sipsolutions.net, davem@davemloft.net, kuba@kernel.org,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller@googlegroups.com,
syzbot+72b99dcf4607e8c770f3@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] wireless/nl80211.c: fix uninitialized variable
Date: Tue, 30 Mar 2021 19:14:57 +0200 [thread overview]
Message-ID: <YGNckfKCPuS5g5UX@kroah.com> (raw)
In-Reply-To: <20210330163705.8061-1-alaaemadhossney.ae@gmail.com>
On Tue, Mar 30, 2021 at 06:37:05PM +0200, Alaa Emad wrote:
> This change fix KMSAN uninit-value in net/wireless/nl80211.c:225 , That
> because of `fixedlen` variable uninitialized,So I initialized it by zero.
>
> Reported-by: syzbot+72b99dcf4607e8c770f3@syzkaller.appspotmail.com
> Signed-off-by: Alaa Emad <alaaemadhossney.ae@gmail.com>
> ---
> Changes in v2:
> - Make the commit message more clearer.
> ---
> net/wireless/nl80211.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 775d0c4d86c3..b87ab67ad33d 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -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;
Please always use scripts/checkpatch.pl before sending out patches. It
would have pointed out that this line is incorrect and needs to be fixed
up :(
thanks,
greg k-h
next prev parent reply other threads:[~2021-03-30 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 16:37 [PATCH v2] wireless/nl80211.c: fix uninitialized variable Alaa Emad
2021-03-30 17:14 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-30 17:22 Alaa Emad
2021-03-30 19:26 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YGNckfKCPuS5g5UX@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alaaemadhossney.ae@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+72b99dcf4607e8c770f3@syzkaller.appspotmail.com \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).