From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D692C388F9 for ; Wed, 11 Nov 2020 19:24:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF79720829 for ; Wed, 11 Nov 2020 19:24:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727701AbgKKTYB (ORCPT ); Wed, 11 Nov 2020 14:24:01 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:35583 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbgKKTYA (ORCPT ); Wed, 11 Nov 2020 14:24:00 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212]) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kcvin-0005qG-Ux; Wed, 11 Nov 2020 19:23:58 +0000 Subject: Re: [PATCH][next] mptcp: fix a dereference of pointer before msk is null checked. To: Mat Martineau , Jakub Kicinski Cc: Matthieu Baerts , "David S . Miller" , Geliang Tang , Paolo Abeni , netdev@vger.kernel.org, mptcp@lists.01.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201109125215.2080172-1-colin.king@canonical.com> From: Colin Ian King Message-ID: Date: Wed, 11 Nov 2020 19:23:57 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/11/2020 18:49, Mat Martineau wrote: > On Mon, 9 Nov 2020, Colin King wrote: > >> From: Colin Ian King >> >> Currently the assignment of pointer net from the sock_net(sk) call >> is potentially dereferencing a null pointer sk. sk points to the >> same location as pointer msk and msk is being null checked after >> the sock_net call.  Fix this by calling sock_net after the null >> check on pointer msk. >> >> Addresses-Coverity: ("Dereference before null check") >> Fixes: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout") >> Signed-off-by: Colin Ian King >> --- >> net/mptcp/pm_netlink.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> > > Hi Colin and Jakub - > > I noticed that the follow-up discussion on this patch didn't go to the > netdev list, so patchwork did not get updated. > > This patch is superseded by the following, which already has a > Reviewed-by tag from Matthieu: > > http://patchwork.ozlabs.org/project/netdev/patch/078a2ef5bdc4e3b2c25ef852461692001f426495.1604976945.git.geliangtang@gmail.com/ > > OK, thanks for letting me know. Good to see it got fixed! Colin > > Thanks! > > -- > Mat Martineau > Intel