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: <20180717105725.5cb8a405@cakuba.lan>
Date:   Tue, 17 Jul 2018 10:57:25 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtnetlink: fix uninitialized variable

On Tue, 17 Jul 2018 08:43:14 -0500, Gustavo A. R. Silva wrote:
> Currently, there are execution paths in which variable err is
> returned without being properly initialized previously:
> 
> 1417        if (rtnl_xdp_report_one(skb, dev, &prog_id, &mode, XDP_ATTACHED_SKB,
> 1418                                IFLA_XDP_SKB_PROG_ID, rtnl_xdp_prog_skb))
> 1419                goto err_cancel;
> 1420        if (rtnl_xdp_report_one(skb, dev, &prog_id, &mode, XDP_ATTACHED_DRV,
> 1421                                IFLA_XDP_DRV_PROG_ID, rtnl_xdp_prog_drv))
> 1422                goto err_cancel;
> 1423        if (rtnl_xdp_report_one(skb, dev, &prog_id, &mode, XDP_ATTACHED_HW,
> 1424                                IFLA_XDP_HW_PROG_ID, rtnl_xdp_prog_hw))
> 1425                goto err_cancel;
> 
> Fix this by initializing variable err to -EMSGSIZE.
> 
> Addresses-Coverity-ID: 1471831 ("Uninitialized scalar variable")
> Fixes: a25717d2b604 ("xdp: support simultaneous driver and hw XDP attachment")
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

Looks like duplicate of:

http://patchwork.ozlabs.org/patch/944662/

Strage GCC doesn't catch this even with W=1, the code is fairly
straightforward :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ