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]
Date:   Fri, 4 Sep 2020 18:17:39 +0000
From:   "Brown, Aaron F" <aaron.f.brown@...el.com>
To:     Stefan Assmann <sassmann@...nic.de>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH v2] i40e: fix return of uninitialized
 aq_ret in i40e_set_vsi_promisc

> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Stefan Assmann
> Sent: Thursday, August 13, 2020 4:27 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; sassmann@...nic.de; kuba@...nel.org;
> davem@...emloft.net
> Subject: [Intel-wired-lan] [PATCH v2] i40e: fix return of uninitialized aq_ret in
> i40e_set_vsi_promisc
> 
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function
> ‘i40e_set_vsi_promisc’:
> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’
> may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   i40e_status aq_ret;
> 
> In case the code inside the if statement and the for loop does not get
> executed aq_ret will be uninitialized when the variable gets returned at
> the end of the function.
> 
> Avoid this by changing num_vlans from int to u16, so aq_ret always gets
> set. Making this change in additional places as num_vlans should never
> be negative.
> 
> Fixes: 37d318d7805f ("i40e: Remove scheduling while atomic possibility")
> Signed-off-by: Stefan Assmann <sassmann@...nic.de>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@...el.com>

Powered by blists - more mailing lists