lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2] wireless/nl80211.c: fix uninitialized variable
    Date
    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;

    if (s1g_bcn) {
    fixedlen = offsetof(struct ieee80211_ext,
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-03-30 19:25    [W:2.992 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site