From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8C27C56202 for ; Fri, 20 Nov 2020 20:59:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6727820BED for ; Fri, 20 Nov 2020 20:59:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="N/RG1ZHp" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730736AbgKTU7X (ORCPT ); Fri, 20 Nov 2020 15:59:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:40400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730536AbgKTU7W (ORCPT ); Fri, 20 Nov 2020 15:59:22 -0500 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD92622264; Fri, 20 Nov 2020 20:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605905962; bh=PqjxBRRlsPYgF/Ba9j+BP8a/9/gJk8ibwk2z0/X43dU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N/RG1ZHpO5EMGuTF+3astQMmAEUj6Biwv81lQv/LE6HJ1zU12fiKyEvGRUOQMW3/5 i0t5pDpww7WtFbh2WNX4Z+dLCKZ72K0KjGbsJybcWjNakcfimmYz8D3E1jSC21BDzu wsbErUfqDoxyDGQoNq6M4mOzzV5PKV6cNIcheQYA= Date: Fri, 20 Nov 2020 12:59:21 -0800 From: Jakub Kicinski To: Vladimir Oltean Cc: Christian Eggers , Andrew Lunn , Florian Fainelli , Vivien Didelot , "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2] net: dsa: avoid potential use-after-free error Message-ID: <20201120125921.1cb76a12@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201120180149.wp4ehikbc2ngvwtf@skbuf> References: <20201119110906.25558-1-ceggers@arri.de> <20201120180149.wp4ehikbc2ngvwtf@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Nov 2020 20:01:49 +0200 Vladimir Oltean wrote: > On Thu, Nov 19, 2020 at 12:09:06PM +0100, Christian Eggers wrote: > > If dsa_switch_ops::port_txtstamp() returns false, clone will be freed > > immediately. Shouldn't store a pointer to freed memory. > > > > Signed-off-by: Christian Eggers > > Fixes: 146d442c2357 ("net: dsa: Keep a pointer to the skb clone for TX timestamping") > > --- > > IMO this is one of the cases to which the following from > Documentation/process/stable-kernel-rules.rst does not apply: > > - It must fix a real bug that bothers people (not a, "This could be a > problem..." type thing). > > Therefore, specifying "net-next" as the target tree here as opposed to > "net" is the correct choice. The commit message doesn't really explain what happens after. Is the dangling pointer ever accessed?