Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3231501rwd; Mon, 22 May 2023 10:24:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VR93uJIaNBsqzWBRTRcIZqNBzbrJd7Fg0VhRQWSrroneXUrNWb8QcxsqUELHqRWPskCmp X-Received: by 2002:a05:6a20:394b:b0:105:b75e:9df9 with SMTP id r11-20020a056a20394b00b00105b75e9df9mr12704216pzg.22.1684776276467; Mon, 22 May 2023 10:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684776276; cv=none; d=google.com; s=arc-20160816; b=IXv4H0U7nQGzuzFjFBHdfHX6P+lQ3x7P1GTVJe0yuxQdxNKe28n8Cw+P84bhvi/WEy 6+3gcgRPGZWrrq9MUKF9jG7M8hNmJnWHda2QqbcZX3Yf0ipCw5Bmamj8me9wqJSQTXRk FP7XPF7dvPy+YMOVkpXwISngBJJsSgE0qdyhlhh9Daxl2MCtN7AviRgSjUtp2FcFVAmx RATQlWs3q/p+OrMzGwrsp5TwbKNAV8kFig7VzqcSkOUyYAvKEoQ50Ge11WKKtqKKea3T 6GbKwlToqg3pv6egjlphvDFZnn5s/CxJJS5PI9kl+XfyC2XO5AzEVvW5FSamDEsXLLZE HK0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y5iWtEgtmh51GCe5Qx6RY42NSqGLhPmhJYpfpOPePBg=; b=WxFmrHXschSHpFzt4bW+/Njeayz4gcfi5HNjCFzjBAuUhgT8NP/2Th28QUwMhBHyAJ GhwNfFU5g9j0n5E8CTLcngPzpd2RqntadFQNuXr40BNYycu5nAzuHpfKBuP3QiXUGtR4 Gts2V1DUE+YI4FPEsdcl1nNL2cGnVGajSrWWNgsXBwon/ycxUW1jaYE0zejVNS8FkVpZ b7i+58EJN/3FL35UCI//DPJRDXOVNcQbBSRHV7SuGNCGxm3uXEUg0pEyG+bs91bviHj7 Y25zqRPEcgqg8zO6IUA3pJTSEpZfkXHNni6CYNBATbQmBPwmeMewhdxvGhk9tz6RuviT 4qkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HsPYkJrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs186-20020a6328c3000000b0053578f3de77si499513pgb.239.2023.05.22.10.24.22; Mon, 22 May 2023 10:24:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HsPYkJrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbjEVRTA (ORCPT + 99 others); Mon, 22 May 2023 13:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231853AbjEVRS5 (ORCPT ); Mon, 22 May 2023 13:18:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1524109 for ; Mon, 22 May 2023 10:18:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2B6AC61F11 for ; Mon, 22 May 2023 17:18:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B724EC433D2; Mon, 22 May 2023 17:18:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684775935; bh=EJh81ERAwI1/1H4wTCD01XYRNVo9bAe3cDknyW2xH9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HsPYkJrrb00WygdzSGGqtiVtGAn1oMi/G1qP3qQyRL+2G1KOu5RW4jt6IHOfm9i7N PrfqyAnCMp+22ZrwjcWXCJ1RFiY9t7uHVLT4C9f6Kz+IRe7v8w86HOIqsNMlYO1EZr k04m5zjmtCQ5d+a85q0mGNnSWNQ6SZY8/WxP2Qa4NkmjMT7gtTBsorVK2QYELM011e yH+Zrnn506u5EaEx2D2ORb2Cf7sSbPtJyClUkXYhMMjRtLw92ZOZZrqK1SV7psLc+V YCY9iVotoOM3+pKePw5DtzW3KCipseBTX4vzdQHMOTTXwWH8jBiRJbznwphiY4nqFi KRRt5+zB3YN3A== From: SeongJae Park To: Kuniyuki Iwashima Cc: sj@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, nmanthey@amazon.de, pabeni@redhat.com, ptyadav@amazon.de, willemb@google.com Subject: Re: [PATCH net] net: fix skb leak in __skb_tstamp_tx() Date: Mon, 22 May 2023 17:18:53 +0000 Message-Id: <20230522171853.90173-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230522170430.56198-1-kuniyu@amazon.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 May 2023 10:04:30 -0700 Kuniyuki Iwashima wrote: > From: SeongJae Park > Date: Mon, 22 May 2023 16:55:05 +0000 > > Hi Pratyush, > > > > On Mon, 22 May 2023 17:30:20 +0200 Pratyush Yadav wrote: > > > > > Commit 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with > > > TX timestamp.") added a call to skb_orphan_frags_rx() to fix leaks with > > > zerocopy skbs. But it ended up adding a leak of its own. When > > > skb_orphan_frags_rx() fails, the function just returns, leaking the skb > > > it just cloned. Free it before returning. > > > > > > This bug was discovered and resolved using Coverity Static Analysis > > > Security Testing (SAST) by Synopsys, Inc. > > > > > > Fixes: 50749f2dd685 ("tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.") > > > > Seems the commit has merged in several stable kernels. Is the bug also > > affecting those? If so, would it be better to Cc stable@vger.kernel.org? > > In netdev, we add 'net' in Subject for bugfix, then netdev maintainers > send a pull request weekly, and stable maintainers backport the fixes to > affected trees. > > So we usually need not CC stable for netdev patches. Thank you for the nice explanation! Seems it is also well documented at https://www.kernel.org/doc/html/v5.10/networking/netdev-FAQ.html#q-i-see-a-network-patch-and-i-think-it-should-be-backported-to-stable However, I don't show the 'net' subject rule on the document. Is it documented somewhere else? Thanks, SJ > > Thanks, > Kuniyuki >