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: <20201112075554.00739ede@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 12 Nov 2020 07:55:54 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Geliang Tang <geliangtang@...il.com>
Cc:     Mat Martineau <mathew.j.martineau@...ux.intel.com>,
        Matthieu Baerts <matthieu.baerts@...sares.net>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        mptcp@...ts.01.org, Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [MPTCP][PATCH v2 net-next] mptcp: fix static checker warnings
 in mptcp_pm_add_timer

On Tue, 10 Nov 2020 11:01:43 +0800 Geliang Tang wrote:
> Fix the following Smatch complaint:
> 
>      net/mptcp/pm_netlink.c:213 mptcp_pm_add_timer()
>      warn: variable dereferenced before check 'msk' (see line 208)
> 
>  net/mptcp/pm_netlink.c
>     207          struct mptcp_sock *msk = entry->sock;
>     208          struct sock *sk = (struct sock *)msk;
>     209          struct net *net = sock_net(sk);
>                                            ^^
>  "msk" dereferenced here.
> 
>     210
>     211          pr_debug("msk=%p", msk);
>     212
>     213          if (!msk)
>                     ^^^^
>  Too late.
> 
>     214                  return;
>     215
> 
> Fixes: 93f323b9cccc ("mptcp: add a new sysctl add_addr_timeout")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Reviewed-by: Dan Carpenter <dan.carpenter@...cle.com>
> Reviewed-by: Matthieu Baerts <matthieu.baerts@...sares.net>
> Signed-off-by: Geliang Tang <geliangtang@...il.com>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ