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 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7A54C5478C for ; Fri, 1 Mar 2024 15:26:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7EA696072A; Fri, 1 Mar 2024 15:26:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B2MkCy9BB5yz; Fri, 1 Mar 2024 15:26:33 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F0C7F60844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1709306793; bh=rBcILteF0nZuPmD1a0EF64QSg7bUeN70mLXpxkWp0I0=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=CftcMgEIBTltyESPFya2OeqRBnenrsYXYHWbPjXd2PjfXMRLZVDvPirP82V1a7rsr vky0DES9hPGogRdFOSBVy0wSgicQOTmpeHdURswjVf1DsGtVFmmT8oFcw1J2O0tai0 joGK1pBwlqffOuYvdyb2g4mWsXdu1+3Bj81I0UZU+q2EjJqNm5eYzz+/q31oeCT1bH 57sb3XDqcqncBbph5ThZhdIDwW9l4eepyn7NBIvVcqHeimgCaNGV5W1rNnkeTd9ScR 7CQJm8DElWSxxK5YdoTZSPdENYJGXX4r10o3adOhBaPWTgCDClHTgKcpeKicFWIvx+ rhvOU6fWkIOLg== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id F0C7F60844; Fri, 1 Mar 2024 15:26:32 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6A0B11BF326 for ; Fri, 1 Mar 2024 15:26:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 56A0D82F51 for ; Fri, 1 Mar 2024 15:26:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xXFRHYWW_HOR for ; Fri, 1 Mar 2024 15:26:30 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=145.40.73.55; helo=sin.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 8A0AF82EBA DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8A0AF82EBA Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8A0AF82EBA for ; Fri, 1 Mar 2024 15:26:30 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 9D10CCE2583; Fri, 1 Mar 2024 15:26:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B606C433C7; Fri, 1 Mar 2024 15:26:23 +0000 (UTC) Date: Fri, 1 Mar 2024 15:26:21 +0000 From: Simon Horman To: Rand Deeb Message-ID: <20240301152621.GC403078@kernel.org> References: <20240228155448.121603-1-rand.sec96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240228155448.121603-1-rand.sec96@gmail.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709306785; bh=zgiUj9sVZV5Oq0DjxQko+Hccbg5xqEMZ+xVejxKhGoo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DrUU4ngcFNuRchLFpsKXqbpsoJake9L5IrlGQHhdba6XZQQA7QmPYrzqnRwFZkOJz IEZgslEEPDxH8GLYLMk5OhBn5pvWiJbLO1zTozo/x1dSVXBkgS/imxQ4AM26lQMA1Z Aavg7kEoioO9ltWD3rRBBGTFU1mpfxURNQwdfzKxt96pWuriqGXNedqPma6cX5xuqm oGXzNUV/HCG5aXiou4uJffUrPU/Ho1FWwX20zmOR2ixHRcVxMcYWJlTx8x7sJOeKI4 ObjXl+sM3wpWz3EzsbaB/GMGxDWG0xq6r67PP57lOqGGzwTjpmfIwl9Bfu8BJJAcde ofC6W9/d0mVrg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=DrUU4ngc Subject: Re: [Intel-wired-lan] [PATCH] net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: voskresenski.stanislav@confident.ru, lvc-project@linuxtesting.org, netdev@vger.kernel.org, Jesse Brandeburg , linux-kernel@vger.kernel.org, Tony Nguyen , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , deeb.rand@confident.ru, "David S . Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Feb 28, 2024 at 06:54:48PM +0300, Rand Deeb wrote: > The function ice_bridge_setlink() may encounter a NULL pointer dereference > if nlmsg_find_attr() returns NULL and br_spec is dereferenced subsequently > in nla_for_each_nested(). To address this issue, add a check to ensure that > br_spec is not NULL before proceeding with the nested attribute iteration. > > Signed-off-by: Rand Deeb Thanks Rand, I do wonder if for some reason this cannot ever occur. But assuming it can then I agree with the fix. Reviewed-by: Simon Horman As a fix I think it probably warrants a fixes tag and being applied to net. As such, the following seems appropriate. Fixes: b1edc14a3fbf ("ice: Implement ice_bridge_getlink and ice_bridge_setlink") ...