Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3248323rwd; Mon, 22 May 2023 10:41:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77Rek/SvjEwMLL4E5oPH8bzU4F28bZjYxly94CGb11igYIgTPz0Jl/UqXyzsFAfqIGpN8n X-Received: by 2002:a17:90b:1e50:b0:252:b14a:55c2 with SMTP id pi16-20020a17090b1e5000b00252b14a55c2mr10328954pjb.9.1684777264091; Mon, 22 May 2023 10:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684777264; cv=none; d=google.com; s=arc-20160816; b=WWkqBvkUk0rrY/lfy6cPiUBgcjT6Kn83LMwzPQhcn+aWGYFQtxvRzEDk8vOFUgawFf FK+DZ/VDCya9d0/S/Oy9NtAIMFComHVQP2vk1Ui57Kls1RoFxaLOGSI3equjzw8wpr8c mfMBAEWwu3WqxfnUz6LQg9cgGsvct+2sQG2Yfd3eoXeB7lWtEeSaGlA4rdxF1JWmOObG rYvFCZuxnSTWy0bLzM/Mntt0tzEnsuTtu6ICFvfpPw09X9R2UWTfyyJIQ24aN7VDX4+y xh+8ORwjV9dnYfG3JkyWjdz/1b2WmUGN2kBCqvef3z+pTj3TW59oYprsO11InlkFXx+X Grfw== 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=1eP8O7T3nyUkNSYcL4q3V4+sZpQ5gjKK9CTIPCzHISM=; b=vkTJ15t12s4VPiV5BDa7QFdMn5gVfUBLeC0RIqSxqMtGFPEHeFAIT6jvm+D/C4Fmr+ 5+hHblZW8JMzMcQ8BYPpKLO8woq3QNXhuKRN5UQB0VUU9eE/jE46oZuqBQaXK8DgWMly TT6/Ora3qHuek0JSNwH2JwUCeNDsWSjk7n4YZ2guy+JwLHSPOsGO1qzURST9tJC0/t+N PzsiuKGhCfUrhf4J3h6eNOxhnI3GFeFDtPjIJCoB5JxY7DDJtRFEB/kOzmpozxKWjx5B QwFGnhymYnLwqkWJyB06R1JVkomALoWQoptuogenoN2cLgigV20WafBMgN583F/cwPIF +Hvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fi5OJHqO; 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 pf16-20020a17090b1d9000b00255813b0d96si1278884pjb.179.2023.05.22.10.40.52; Mon, 22 May 2023 10:41:04 -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=Fi5OJHqO; 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 S233014AbjEVReB (ORCPT + 99 others); Mon, 22 May 2023 13:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232915AbjEVRd7 (ORCPT ); Mon, 22 May 2023 13:33:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 606E4DB for ; Mon, 22 May 2023 10:33:55 -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 F1F8561D65 for ; Mon, 22 May 2023 17:33:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B9C5C433EF; Mon, 22 May 2023 17:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684776834; bh=3qPc6G08Jn9Bp0Ht/x/Mtqj5U8h5QTlMNQbXuZkNyD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fi5OJHqOQ47Onye5elrcOF3+9RsrDjMBtTluLMhm7gyZSRzOXFoyzJ5Ib5/Vh3BGV HWMBeMVxPcdVZF9mIDXTEUk4ngqNIXdkYZLYuU6hL0rf6DPVxgvOQSIe975uaZlXGj 1iawUj6HuNP4rghhlIuBg2itRk1mAd5jgz8VnnsONe/gqIddjgrw4pqjm231/eXK5e IfbLzb94DvLWMSOf/03k1z2A0oAiUcjFAnqXLDjIaIqv+xzpNrbBNM4CePlJFDaZY7 0qEHThSa18Qp7INUnuCg0Mb/LY4q4RnOyyJ0xAayUTkD22UjReTSsk/oUCdJucMZps d1nqABMoUR4dw== From: SeongJae Park To: SeongJae Park Cc: Kuniyuki Iwashima , 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:33:51 +0000 Message-Id: <20230522173351.90497-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230522172302.90235-1-sj@kernel.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 17:23:02 +0000 SeongJae Park wrote: > On Mon, 22 May 2023 17:18:53 +0000 SeongJae Park wrote: > > > 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? > > Seems I overlooked this: > https://www.kernel.org/doc/html/v5.10/networking/netdev-FAQ.html#q-how-do-i-indicate-which-tree-net-vs-net-next-my-patch-should-be-in Sorry for continuing adding noises, but seems the process is, or will be, changed by to the mainline commit dbbe7c962c3a8 ("docs: networking: drop special stable handling"). Thanks, SJ [...]