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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 D3422C4361B for ; Tue, 8 Dec 2020 23:56:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7A8623B44 for ; Tue, 8 Dec 2020 23:56:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730649AbgLHXzh (ORCPT ); Tue, 8 Dec 2020 18:55:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730611AbgLHXzg (ORCPT ); Tue, 8 Dec 2020 18:55:36 -0500 Received: from mail.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19B5C06179C; Tue, 8 Dec 2020 15:54:56 -0800 (PST) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) by mail.monkeyblade.net (Postfix) with ESMTPSA id A65B84D248DBC; Tue, 8 Dec 2020 15:54:55 -0800 (PST) Date: Tue, 08 Dec 2020 15:54:54 -0800 (PST) Message-Id: <20201208.155454.2156057383798260135.davem@davemloft.net> To: cengiz@kernel.wtf Cc: jmaloy@redhat.com, ying.xue@windriver.com, kuba@kernel.org, netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: tipc: prevent possible null deref of link From: David Miller In-Reply-To: <20201207081423.67313-1-cengiz@kernel.wtf> References: <20201207081423.67313-1-cengiz@kernel.wtf> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail.monkeyblade.net [0.0.0.0]); Tue, 08 Dec 2020 15:54:55 -0800 (PST) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Cengiz Can Date: Mon, 7 Dec 2020 11:14:24 +0300 > `tipc_node_apply_property` does a null check on a `tipc_link_entry` > pointer but also accesses the same pointer out of the null check block. > > This triggers a warning on Coverity Static Analyzer because we're > implying that `e->link` can BE null. > > Move "Update MTU for node link entry" line into if block to make sure > that we're not in a state that `e->link` is null. > > Signed-off-by: Cengiz Can > --- Applied, thanks.,