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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 D0D49C0218F for ; Fri, 31 Jan 2025 14:56:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 75C7140795; Fri, 31 Jan 2025 14:56:39 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id MVBHZdPupMqp; Fri, 31 Jan 2025 14:56:38 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 99DCC40643 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1738335398; bh=7NsVuDlT0uQJgBtEOy4n1OF/w1q+d+szEF5tXjQdwlI=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TKgZRIzmfqWXI0hdb4TtGZ4hOfcmDz3SaBA/OeJLCdkHfgO3xg7ELkpR+1Tgj4HTR yxwfgDoz7Wug/PG2RSBsSQrKCJiXkDwU7m62c1TBAYCukgYSTlT+zpFXK0lc21zia1 meLUREz1jsgYFiRdVrQFN+ObkFT8mQzmIzmkJGc54o21LJR01s7cOLKXpgXFr0g5lF lHYdlrSKJR4CEVTrVlS2T6x6UdJmx5xf6bXXngZ3hLLdrcrWblSdTOQydYBQuMae6B zzjOKBxLTuvNDv3zgYSqCxaNaCfcXn+JMdVMxbzWjD3tog8QDvNfALSpkaJvZ9T5wz fTK5bDvsM9JQw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 99DCC40643; Fri, 31 Jan 2025 14:56:38 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id 75FDF16E for ; Fri, 31 Jan 2025 14:56:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5A4D66076D for ; Fri, 31 Jan 2025 14:56:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9zPp_B6cW45A for ; Fri, 31 Jan 2025 14:56:36 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=147.75.193.91; helo=nyc.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org A7CA260612 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A7CA260612 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by smtp3.osuosl.org (Postfix) with ESMTPS id A7CA260612 for ; Fri, 31 Jan 2025 14:56:36 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 8629BA41F59; Fri, 31 Jan 2025 14:54:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35B9AC4CED1; Fri, 31 Jan 2025 14:56:33 +0000 (UTC) Date: Fri, 31 Jan 2025 14:56:31 +0000 From: Simon Horman To: Piotr Kwapulinski Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, dan.carpenter@linaro.org, yuehaibing@huawei.com, maciej.fijalkowski@intel.com, przemyslaw.kitszel@intel.com Message-ID: <20250131145631.GA34138@kernel.org> References: <20250131121450.11645-1-piotr.kwapulinski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250131121450.11645-1-piotr.kwapulinski@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738335394; bh=+qOB8ecQF1mqWeRzosyh6gMdfavZ114YSX2AA7ma9oo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qsZdb1vXMHgeAufN2P8/tdBhL9dyeZpOw2fgRlvjh6Yqg+g/18ylES5nRnSVnqX52 rkEVp8KNZPY837eBndU+mNi74isovDqfnBnCDtXAxTjCBSk/UMO8BmbSnBtxsidXM0 mEVYQJYRlYluY3LppXM3bu36P+JL9UQv1oTUrPCZhplThXdFNzy28FAI9iF3BPOZHk Y+AdScOermMV7x6jjGPKTpwbV8OluRbVghpGdG5KxVYxtOD/+uHRbrYQUtcW/PL0Mj zbzOw08qLdEYnEuTJ6tykJmZEs0rKi5lNM0ZWr8NIlZZIJX+dd4G/Am68Ex5fVTAWs FpyvSvEYvA1mg== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp3.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=qsZdb1vX Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4] ixgbe: Fix possible skb NULL pointer dereference X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Fri, Jan 31, 2025 at 01:14:50PM +0100, Piotr Kwapulinski wrote: > The commit c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in > ixgbe_run_xdp()") stopped utilizing the ERR-like macros for xdp status > encoding. Propagate this logic to the ixgbe_put_rx_buffer(). > > The commit also relaxed the skb NULL pointer check - caught by Smatch. > Restore this check. > > Fixes: c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()") > Reported-by: Dan Carpenter > Acked-by: Maciej Fijalkowski > Signed-off-by: Piotr Kwapulinski > --- > v1 -> v2 > Provide extra details in commit message for motivation of this patch > v2 -> v3 > Simplify the check condition > v3 -> v4 > Rebase to net-queue Reviewed-by: Simon Horman From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27E524502A for ; Fri, 31 Jan 2025 14:56:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738335395; cv=none; b=QGZy0rYIKb4lvxAy0RRjvzMi4NmeruYFW0qgWelumqpFykO44RQJY4YJzP4Zh/Q2nzI+B1Fs84WVPOKeVbI/GuMIhW2Qu3GsxKm39IQ6E5Nik9P3IioA1keLZyoaRMmnAwWBpN3FgwEF10EMFYiu55Gb/rgDDl1fdGms7NH67H4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738335395; c=relaxed/simple; bh=+qOB8ecQF1mqWeRzosyh6gMdfavZ114YSX2AA7ma9oo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kKrPfNHtLVC3Jbwc+gUKqzwEXDmeNA08F1x0QUky/ZSPBMS7rIihjXOIiEFsZpUVV5pB2hTh53sx9RZQyfwq1+FuIbhZuoWMLBJ7TVLFRGmNdPAmlodrSOCOx4Ww66KYnmemLIt/y6kBSyi3wMjPLm51RHCkko7JKJu+yTYv5bs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qsZdb1vX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qsZdb1vX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35B9AC4CED1; Fri, 31 Jan 2025 14:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738335394; bh=+qOB8ecQF1mqWeRzosyh6gMdfavZ114YSX2AA7ma9oo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qsZdb1vXMHgeAufN2P8/tdBhL9dyeZpOw2fgRlvjh6Yqg+g/18ylES5nRnSVnqX52 rkEVp8KNZPY837eBndU+mNi74isovDqfnBnCDtXAxTjCBSk/UMO8BmbSnBtxsidXM0 mEVYQJYRlYluY3LppXM3bu36P+JL9UQv1oTUrPCZhplThXdFNzy28FAI9iF3BPOZHk Y+AdScOermMV7x6jjGPKTpwbV8OluRbVghpGdG5KxVYxtOD/+uHRbrYQUtcW/PL0Mj zbzOw08qLdEYnEuTJ6tykJmZEs0rKi5lNM0ZWr8NIlZZIJX+dd4G/Am68Ex5fVTAWs FpyvSvEYvA1mg== Date: Fri, 31 Jan 2025 14:56:31 +0000 From: Simon Horman To: Piotr Kwapulinski Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, dan.carpenter@linaro.org, yuehaibing@huawei.com, maciej.fijalkowski@intel.com, przemyslaw.kitszel@intel.com Subject: Re: [PATCH iwl-next v4] ixgbe: Fix possible skb NULL pointer dereference Message-ID: <20250131145631.GA34138@kernel.org> References: <20250131121450.11645-1-piotr.kwapulinski@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250131121450.11645-1-piotr.kwapulinski@intel.com> On Fri, Jan 31, 2025 at 01:14:50PM +0100, Piotr Kwapulinski wrote: > The commit c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in > ixgbe_run_xdp()") stopped utilizing the ERR-like macros for xdp status > encoding. Propagate this logic to the ixgbe_put_rx_buffer(). > > The commit also relaxed the skb NULL pointer check - caught by Smatch. > Restore this check. > > Fixes: c824125cbb18 ("ixgbe: Fix passing 0 to ERR_PTR in ixgbe_run_xdp()") > Reported-by: Dan Carpenter > Acked-by: Maciej Fijalkowski > Signed-off-by: Piotr Kwapulinski > --- > v1 -> v2 > Provide extra details in commit message for motivation of this patch > v2 -> v3 > Simplify the check condition > v3 -> v4 > Rebase to net-queue Reviewed-by: Simon Horman