Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3229889rwd; Mon, 22 May 2023 10:23:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7J9CXjN/gXzK8HGqHevj45FNL884yoVtMru9WP5SMcT3mkiXCRvFZuBcj/OfTT2+6Q3RyN X-Received: by 2002:a05:6a00:10c1:b0:638:edbc:74ca with SMTP id d1-20020a056a0010c100b00638edbc74camr15291625pfu.0.1684776188924; Mon, 22 May 2023 10:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684776188; cv=none; d=google.com; s=arc-20160816; b=UNmwZ7OUkbXMTcfc6uszFFe/5GPBUxd+nY78V7MqKpelXQZXy3SYI8sXf9yWZVaEK2 R+uyp8P/2wLbJq0Kdsopc46r7f1M6WUbcu35NTaJpjjPRz9xu/xEe8YT8X3ttSNVhYNP y9OYaqAAyUHmzvNz41hQjnLJs+kiXV2pHrDq28ZmtsbJusxKCdbqHvgb4JYq2UUyjs3V h1RsgoV9Q444s4RwvggLcEgf/sLR1m4hV2+9j8Hv5u2I6AXlIAPh6yDq5srWpzH40XEf YllcCu7AmyUHOe9ygm8TaEN9PQl/tnOTmLRCrY/MIP52Lk9dtCebD01k9onLmyqm6MFq 1sxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XD4II6sOrfSAsCe0L7jq6DV9vsjiFVd0yfGahpAfSZM=; b=E22Yj5tJIpN8D3bXgtzbJwkgLyjP5M6kjXnO8HkCMEhdL2rB5fSHRdKxwGWFespwXp cucCPzigyVdkkFiSpMR73U69tIY8P7hAbYOpeaWYIHVrDm1y6gy1ToOmtMjciFSbF2tr uHoNSu80gFbbcGrhdCK4DLYaVsS8ZwT6pU9WMQ7VcZZa150cxyWHrhAohNSkpk2B4UEf E201163lgjlejNUW8nMtKvu9DfeXsuwJ6NgZjLpDPHFCO8itXdH6ty6FckorSdprSCHj 64AMv3xitZfNvUtmf5optYwnnI00M+FW/HFlm2RFgfL7qwiVzAuiGdjdVmdRJ8stlzIL yVHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kUkGslzD; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a6543c7000000b00518cf8916e2si605281pgp.415.2023.05.22.10.22.56; Mon, 22 May 2023 10:23:08 -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=@linuxfoundation.org header.s=korg header.b=kUkGslzD; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230454AbjEVRId (ORCPT + 99 others); Mon, 22 May 2023 13:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbjEVRI2 (ORCPT ); Mon, 22 May 2023 13:08:28 -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 E3DCEFA; Mon, 22 May 2023 10:08:26 -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 7A38761AE1; Mon, 22 May 2023 17:08:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BBB3C433D2; Mon, 22 May 2023 17:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684775305; bh=j6fRu1rODBhFFMabejuYKbw6ODpKa3E9i0hI3fijSwg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kUkGslzDWWURjKyZmAj8QCL8ejEnGvHSRpJE0epFEj7C7fbmpVkDjTHHKuI3NnrFc DI8+Qo8W5twvtXYWgM2ectzhQ3DWVXy0Q2oO5GXGy9Ubnh0hNHyHEIOPI60MaorCWg fvZR6Wl3fBwlQAoZhKI5QEOAGDYoHQVysfK/9qAc= Date: Mon, 22 May 2023 18:08:21 +0100 From: Greg KH To: Pratyush Yadav Cc: SeongJae Park , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kuniyuki Iwashima , Willem de Bruijn , Norbert Manthey , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH net] net: fix skb leak in __skb_tstamp_tx() Message-ID: <2023052208-squad-viper-b244@gregkh> References: <20230522165505.90105-1-sj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, May 22, 2023 at 07:03:59PM +0200, Pratyush Yadav wrote: > On Mon, May 22 2023, SeongJae Park wrote: > > > 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? > > > > It affects v5.4.243 at least, since that is where I first saw this. But > I would expect it to affect other stable kernels it has been backported > to as well. I thought using the Fixes tag pointing to the bad upstream > commit would be enough for the stable maintainers' tooling/bots to pick > this patch up. > > In either case, +Cc stable. Link to the patch this thread is talking > about [0]. This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.