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: <87sfru9jwz.fsf@nvidia.com>
Date:   Mon, 7 Mar 2022 10:43:28 +0100
From:   Petr Machata <petrm@...dia.com>
To:     <trix@...hat.com>
CC:     <davem@...emloft.net>, <kuba@...nel.org>, <nathan@...nel.org>,
        <ndesaulniers@...gle.com>, <idosch@...dia.com>, <petrm@...dia.com>,
        <edumazet@...gle.com>, <avagin@...il.com>, <yajun.deng@...ux.dev>,
        <johannes.berg@...el.com>, <cong.wang@...edance.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <llvm@...ts.linux.dev>
Subject: Re: [PATCH] net: rtnetlink: fix error handling in
 rtnl_fill_statsinfo()


trix@...hat.com writes:

> From: Tom Rix <trix@...hat.com>
>
> The clang static analyzer reports this issue
> rtnetlink.c:5481:2: warning: Undefined or garbage
>   value returned to caller
>   return err;
>   ^~~~~~~~~~
>
> There is a function level err variable, in the
> list_for_each_entry_rcu block there is a shadow
> err.  Remove the shadow.
>
> In the same block, the call to nla_nest_start_noflag()
> can fail without setting an err.  Set the err
> to -EMSGSIZE.
>
> Fixes: 216e690631f5 ("net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns")
> Signed-off-by: Tom Rix <trix@...hat.com>

Reviewed-by: Petr Machata <petrm@...dia.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ