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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f6f8246f0cd477c0b1e2b88b4ec825a@codeaurora.org>
Date:   Thu, 03 Jun 2021 23:15:10 -0600
From:   subashab@...eaurora.org
To:     patchwork-bot+netdevbpf@...nel.org
Cc:     Nathan Chancellor <nathan@...nel.org>, stranche@...eaurora.org,
        davem@...emloft.net, kuba@...nel.org, ndesaulniers@...gle.com,
        sharathv@...eaurora.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH net-next] net: ethernet: rmnet: Restructure if checks to
 avoid uninitialized warning

On 2021-06-03 16:40, patchwork-bot+netdevbpf@...nel.org wrote:
> Hello:
> 
> This patch was applied to netdev/net-next.git (refs/heads/master):
> 
> On Thu,  3 Jun 2021 10:34:10 -0700 you wrote:
>> Clang warns that proto in rmnet_map_v5_checksum_uplink_packet() might 
>> be
>> used uninitialized:
>> 
>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:14: warning:
>> variable 'proto' is used uninitialized whenever 'if' condition is 
>> false
>> [-Wsometimes-uninitialized]
>>                 } else if (skb->protocol == htons(ETH_P_IPV6)) {
>>                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:295:36: note:
>> uninitialized use occurs here
>>                 check = rmnet_map_get_csum_field(proto, trans);
>>                                                  ^~~~~
>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:283:10: note:
>> remove the 'if' if its condition is always true
>>                 } else if (skb->protocol == htons(ETH_P_IPV6)) {
>>                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c:270:11: note:
>> initialize the variable 'proto' to silence this warning
>>                 u8 proto;
>>                         ^
>>                          = '\0'
>> 1 warning generated.
>> 
>> [...]
> 
> Here is the summary with links:
>   - [net-next] net: ethernet: rmnet: Restructure if checks to avoid
> uninitialized warning
>     https://git.kernel.org/netdev/net-next/c/118de6106735
> 
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html

Hi Nathan

Can you tell why CLANG detected this error.
Does it require a bug fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ