lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171214124413.A4A5560A60@smtp.codeaurora.org>
Date:   Thu, 14 Dec 2017 12:44:13 +0000 (UTC)
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Nicolas Iooss <nicolas.iooss_linux@....org>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        Chaoming Li <chaoming_li@...lsil.com.cn>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Nicolas Iooss <nicolas.iooss_linux@....org>
Subject: Re: [1/1] rtlwifi: always initialize variables given to RT_TRACE()

Nicolas Iooss <nicolas.iooss_linux@....org> wrote:

> In rtl_rx_ampdu_apply(), when rtlpriv->cfg->ops->get_btc_status()
> returns false, RT_TRACE() is called with the values of variables
> reject_agg and agg_size, which have not been initialized.
> 
> Always initialize these variables in order to prevent using
> uninitialized values.
> 
> This issue has been found with clang. The compiler reported:
> 
>     drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
>     'agg_size' is used uninitialized whenever 'if' condition is false
>     [-Werror,-Wsometimes-uninitialized]
>             if (rtlpriv->cfg->ops->get_btc_status())
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/net/wireless/realtek/rtlwifi/base.c:1671:31: note:
>     uninitialized use occurs here
>                      reject_agg, ctrl_agg_size, agg_size);
>                                                 ^~~~~~~~
> 
>     drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
>     'reject_agg' is used uninitialized whenever 'if' condition
>           is false [-Werror,-Wsometimes-uninitialized]
>             if (rtlpriv->cfg->ops->get_btc_status())
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/net/wireless/realtek/rtlwifi/base.c:1671:4: note:
>     uninitialized use occurs here
>                      reject_agg, ctrl_agg_size, agg_size);
>                      ^~~~~~~~~~
> 
> Fixes: 2635664e6e4a ("rtlwifi: Add rx ampdu cfg for btcoexist.")
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@....org>

Patch applied to wireless-drivers-next.git, thanks.

e4779162f737 rtlwifi: always initialize variables given to RT_TRACE()

-- 
https://patchwork.kernel.org/patch/10103995/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ