Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2533616lqb; Tue, 28 May 2024 03:00:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUTujnKZ4OFEwo5lVH92sg9c053nqk5FmdBmGvuSyorGkht3PbrnVU2Pz+hSLyT2UYs7ZLevLoIE7nwwD1J0HzHDpaEbzgn4VxgAgwcIw== X-Google-Smtp-Source: AGHT+IFI34e7MG0ETWuNHxrma8SXp3hIdhSumGPweziLsdB6y3FAralG2Y5RMDNqA9861Wu80XQp X-Received: by 2002:a17:906:e09a:b0:a59:a2f0:ee51 with SMTP id a640c23a62f3a-a62651199f1mr1245792266b.54.1716890450398; Tue, 28 May 2024 03:00:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716890450; cv=pass; d=google.com; s=arc-20160816; b=rJ9qXPwJt5Y3T6sKRMS12lxlKHnA2PPO97vkaiWoL434tA2NIMEhGGy4bXQ+bb/XDZ wGzLO6xJ9ZgWRa2TXItN9+/fQ+iUhyIn1YkuJIqOLjFYQZz8xL8xgCPv3AeEEPhX517Q byz//vM/Cko0ArZxnv7nOfjmLUU4oraXxDUmHydojzG+vsfAGWuyidQLbHMS0BlctMWm mljW5MiUR+W5LBgnfrYq5oSlLLQU1fgZPL+NLc37VL8Tuf3yHXd14JGjOtJ+V6lUUOOE jF+USeJzt8FO+ZN8OqTWkP7BNxMBK8nrG8YYbsDRgIRX6VvbI1uZw8kGSLXdUSjO8cRS Vnog== 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:dkim-filter; bh=6Ot/GFVOjRUsBu7RKou1Q5f50QI9v1WxPujt2anjQ/I=; fh=Jjre1TRxlLFd+r7b1io6+vp/85p1jcoAP0Y8u6BCD5c=; b=nE+r0oDN95HnTdIXoYn1q+u3G8+cdqQL1rYzB4KmJoUMDSBEOpw9S3h3oVYnoHy2sY o6H7wNm2EJ/RiqiAOSTkZQU9tqO66EdSp1FP+9TmuLW9TQ+AbV00mHz+bk4AfPmOTPWJ ysfXooafSKT5MO2MpKuFQ+4UCwuQhaJkv9RinK/9+nXLfgNTD/Y5L9uGLhvBxvx3EoKJ 4L5e1RPajtDRgKnrmxz5LLzSHoR+bJpEgwiEU+y0k6omngEsfGgIJgPdn4usvvZ5mb28 1qcijE/M04gVMyrAEMKPW1Qb+UnQnSupZCFR74XaZNc5rCO7noIrWkUfxyQT0jZNmE/c LSlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@secunet.com header.s=202301 header.b=ztKF169g; arc=pass (i=1 spf=pass spfdomain=secunet.com dkim=pass dkdomain=secunet.com); spf=pass (google.com: domain of linux-kernel+bounces-192059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192059-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a62fb6cf726si196937266b.319.2024.05.28.03.00.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@secunet.com header.s=202301 header.b=ztKF169g; arc=pass (i=1 spf=pass spfdomain=secunet.com dkim=pass dkdomain=secunet.com); spf=pass (google.com: domain of linux-kernel+bounces-192059-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192059-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 27F271F25D73 for ; Tue, 28 May 2024 10:00:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A0D416C445; Tue, 28 May 2024 09:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="ztKF169g" Received: from a.mx.secunet.com (a.mx.secunet.com [62.96.220.36]) (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 A26C317E8F4; Tue, 28 May 2024 09:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.96.220.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716890227; cv=none; b=kW9gsFD5dn/y4DerzMHJv2W7jcTZ9EqYydlFWrTui+14Y1BkwklbJoJSq9RXNYOGHw0fX+wpTNUa7asEpJiadNkk4bjuyfWnPQ4pEJRsQ8DtsdwHMXAzblV4io16727pf44IZqvev75YJDISPJjZZV9pWFVaEp/3FpskWiXG8KY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716890227; c=relaxed/simple; bh=y5z4GbSeQXW8JH0VzKQMyVb21xnQikEGwBxqYIlqccA=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W29LIp7Cni7YM0t5LxLLgEnOD8olLzMspxab1H8HOJgkdcOdzG+IWKO4Cj/J2oJeUlrTTkNfU6UUM9Wp3fgidiQvmsTS4VLJnepPbtSVlrrYXYnLeNsvzISUnZ8tt9k1/9JlH0B1D7w0dhcPynwgm9aF5xcMH40aE8KsfCiWMgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b=ztKF169g; arc=none smtp.client-ip=62.96.220.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=secunet.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 89FB82058E; Tue, 28 May 2024 11:57:02 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7u6tS9wgAtF5; Tue, 28 May 2024 11:57:02 +0200 (CEST) Received: from mailout1.secunet.com (mailout1.secunet.com [62.96.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 0C672201AE; Tue, 28 May 2024 11:57:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 a.mx.secunet.com 0C672201AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1716890222; bh=6Ot/GFVOjRUsBu7RKou1Q5f50QI9v1WxPujt2anjQ/I=; h=Date:From:To:CC:Subject:References:In-Reply-To:From; b=ztKF169gacjL8tbdNG4r9VM93scUMuK0GfpeXwKqFew3mxX7Vme+x5IjxRjharmRS I9HcW3w0dMSxP0SPhPRtB4zRzOe1Nk/abL65MEIsJor4nveMjmgPxkQY32o7AOqN8M GIWLMhSTvVBTMHXt+aKFcyNZQ6vSRS9v7IPT7lSvLVi6LTZjNvQAMB49sHZfHS+8/G oGIAJ8YcRAoi5YkXXeWvoMBZT+j/Izn8LLgg+LcDg0p7/A7HYK87NWFQQxZT8ob3Cn YyO1vvmeBlDlm2ZCRphICE7S8FTQq4K8gc7uRJ9QwgdhFR7f+CVqJn+v4hcQNmdsRi Dh718nx+6fRkA== Received: from cas-essen-01.secunet.de (unknown [10.53.40.201]) by mailout1.secunet.com (Postfix) with ESMTP id 0038A80004A; Tue, 28 May 2024 11:57:02 +0200 (CEST) Received: from mbx-essen-02.secunet.de (10.53.40.198) by cas-essen-01.secunet.de (10.53.40.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 28 May 2024 11:57:01 +0200 Received: from gauss2.secunet.de (10.182.7.193) by mbx-essen-02.secunet.de (10.53.40.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 28 May 2024 11:57:01 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id C8C7D3182545; Tue, 28 May 2024 11:57:00 +0200 (CEST) Date: Tue, 28 May 2024 11:57:00 +0200 From: Steffen Klassert To: Hagar Hemdan CC: Norbert Manthey , Herbert Xu , "David S. Miller" , "David Ahern" , Eric Dumazet , "Jakub Kicinski" , Paolo Abeni , Sabrina Dubroca , , Subject: Re: [PATCH v2] net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP Message-ID: References: <20240518130439.20374-1-hagarhem@amazon.com> 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: <20240518130439.20374-1-hagarhem@amazon.com> X-ClientProxiedBy: cas-essen-01.secunet.de (10.53.40.201) To mbx-essen-02.secunet.de (10.53.40.198) X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 On Sat, May 18, 2024 at 01:04:39PM +0000, Hagar Hemdan wrote: > xmit() functions should consume skb or return error codes in error > paths. > When the configuration "CONFIG_INET_ESPINTCP" is not set, the > implementation of the function "esp_output_tail_tcp" violates this rule. > The function frees the skb and returns the error code. > This change removes the kfree_skb from both functions, for both > esp4 and esp6. > WARN_ON is added because esp_output_tail_tcp() should never be called if > CONFIG_INET_ESPINTCP is not set. > > This bug was discovered and resolved using Coverity Static Analysis > Security Testing (SAST) by Synopsys, Inc. > > Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") > Signed-off-by: Hagar Hemdan Patch applied, thanks a lot!