Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp811505lqc; Fri, 8 Mar 2024 12:19:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXeP3dUpmaX/YyhN7nPtiZ1K++ue5XX9Rpe1L0uXftTRch3x8e4iK8CKXUQn175xU+27Ai7y32T7nPsLA2L/7dV6fGld7o8xhYsXh4SZg== X-Google-Smtp-Source: AGHT+IFVDA8LtuG2Xlq6QyqhasaO7jB+5IaBy1ZANBjHepQ0Z3xMx62Gr0yz5Dz2Do7Ud+UrXpXY X-Received: by 2002:a17:902:f805:b0:1dc:cc01:7488 with SMTP id ix5-20020a170902f80500b001dccc017488mr148588plb.25.1709929168450; Fri, 08 Mar 2024 12:19:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709929168; cv=pass; d=google.com; s=arc-20160816; b=yc6uPGxwE3H4rbYrf8t7aN6SwZAJXLc3W8K5cqSgEzksL7TfO9TopCplmcjeQYfanI ebDYYb45EdVGDCgUhTHiMkQuyQE1VMu4sP0rGnyYHDLQFOcNVttg2zgMo0hTNCYdwOtR Ld3vz1ekLpYM1nzYskkmzk49kurz5Hjqxi39jbIvO+YZzbHQr4LTcCmRlZyT+2U13eJL jPFGfPBs1ipe/6aN68F5coBWcBjR5PV0H8IHjspkVFSxnABN9tp9vsBhEUJdh4e4tHK0 6Z8cQ/uuqFFTm5CZohpV0jaDhaZxsC6Rvggq2h3cOJllJreaXuzl+FjzvslgbIQksYoV Qhlg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IGuSE1PefaOCu0foyatimcVITcdK4/XMPHZZnEdRvIE=; fh=sbxrC+pz/ZBigW9pEPO8j3GNssudPcUob5G27G47isE=; b=irhCq+jrnb3KwNkv+ASf+HdAKFzuFVZamIZmwgmyBTcpNvRUq6ymUeWJB0fdVmLkvz ZThvEOD2xAZHetgqg5hbQrjXn3Uug/vJ8/5aJs98NcaL0ZFsXYh6hJUTVglJhuyl02xU HV4z/NP7d9Xk97JKuofXi9AcGCa4xcEzXSHTIl1Pxf6xHvbOSn+K4KdSwt9F4nfLKFhs SZQdMOL4aC+jPs9Wzkx9QDM2D/BmiOc1SEqrt7B6QxtVwMDVfUOZel/fYAZV86vpBOZ0 U40ccRZYQZ55JsUqadAv4kwnjZnwFfL4qPgJwHccCuWu9XDFVCvN1TIj1isQLADP8tkD Z5AA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xa9WULFO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l20-20020a170903005400b001dc8f8e63e8si84193pla.271.2024.03.08.12.19.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 12:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Xa9WULFO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-97537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E9F43B2168C for ; Fri, 8 Mar 2024 20:19:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A88DF5C911; Fri, 8 Mar 2024 20:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xa9WULFO" 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 CD19D26AD7; Fri, 8 Mar 2024 20:19:16 +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=1709929156; cv=none; b=fKqZ88XV3zLijiKAx4JlYkcWjdLpOvBOE3DINuMOTErxU067EFGuz7JQIKmnmthoWIIqzlPSLoQBU/wfWMTtIioATbkl+IjDZTTJk+YlDqTEuEPJi0ANRMdb8BEdDGadzgro0FIHXlkb9Zc4bsAf9cgZW8vLI7mrUlFhQrsAs2g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709929156; c=relaxed/simple; bh=l2cUl9gunXO/uQogDSHExXcrnnTLLkpspxEvydZvLQU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kIryaJa8JK1cwWi2zc6lpSsmWGG3R1+VvJhdoC6zkz5GrI/nqN/s9+/lcJds+5mGFu1nPGrVRVQvl4A+yC1GXt1/94qLm6KNoiobWpdcdRWY/8D7K5sCsCLfZgm/6+UoNC6XQodzx0ZLeZRxanEDNfaZIPbAbWzJvI/MZIpA7so= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Xa9WULFO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 993B2C433C7; Fri, 8 Mar 2024 20:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709929156; bh=l2cUl9gunXO/uQogDSHExXcrnnTLLkpspxEvydZvLQU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xa9WULFONf0umk5tj4E6x3LwcgLAgRnSYAO/piMN4LNSxqecZp3MXjV59yfHDqlq4 /iY8n6DGxi6wCXmuIgFQ2hCNrC9FGZqn+w5TZO7E/SuZo7JlQE7ds3E10FolAmq5yK fveb/5hNURQnqBZcK2gAISWjhAuwR+nbdP65WOkLSF1oQLqa+LqoOeabDDNt/XLv2i yto8wQJhhZ24V+ThZfW4M7a2J2qsfvzJLMKNqzUeiAuriZRJXRw5+m5kkZD89PTgy0 HG8gwTwiBxJFvioXdafVICuPENDYMcpI5TSUmVWqTuWY0I+k1bNVgJunF0HvWvVnUh RbHPfMrWrY3gw== Date: Fri, 8 Mar 2024 20:19:11 +0000 From: Simon Horman To: Aleksandr Mishin Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kees Cook , Justin Stitt , Felix Manlunas , Satanand Burla , Raghu Vatsavayi , Vijaya Mohan Guvva , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] liquidio: Fix potential null pointer dereference Message-ID: <20240308201911.GB603911@kernel.org> References: <20240307092932.18419-1-amishin@t-argos.ru> Precedence: bulk X-Mailing-List: linux-kernel@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: <20240307092932.18419-1-amishin@t-argos.ru> On Thu, Mar 07, 2024 at 12:29:32PM +0300, Aleksandr Mishin wrote: > In lio_vf_rep_copy_packet() pg_info->page is compared to a NULL value, > but then it is unconditionally passed to skb_add_rx_frag() which could > lead to null pointer dereference. > Fix this bug by moving skb_add_rx_frag() into conditional scope. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 1f233f327913 (liquidio: switchdev support for LiquidIO NIC) A correct format for the tag above is: Fixes: 1f233f327913 ("liquidio: switchdev support for LiquidIO NIC") > Signed-off-by: Aleksandr Mishin I guess this code is never hit. But I agree this should be fixed. Reviewed-by: Simon Horman