Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28720620rwd; Wed, 5 Jul 2023 01:28:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGUcfskjFVFEAP7a75SgTfy9JMSB4EbvsBMoNXeTMMErrgOWMPQlD0oyxbbbrF0bRrwCWzg X-Received: by 2002:a17:902:d2c1:b0:1b8:6245:1235 with SMTP id n1-20020a170902d2c100b001b862451235mr2447735plc.13.1688545737254; Wed, 05 Jul 2023 01:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688545737; cv=none; d=google.com; s=arc-20160816; b=GoJuEutfdpuK04SCBn1PRrUBZ8w42p3Yt3n3lDi0hYRchnuBHjZaPLPBvaUGyImxUn hRPVXH+C0+AhegB5jev9dEm8LdnNe2uEYWWiBLYZ5zNK/+yugxbJ8kzAIdrBgzt/cgGQ HIHqVPC4VAW121rgZ9ftu7TPV89fX6BKgM0biDHKrFGYlkcrJ/opj9Dyjs8oD0/j5yWw Hp9+oBz8mfDPDnMW1FsBjnllXxh5lZrHGYuVEHAxRXRRhRLec3brLuHDGE3kaDJenx6e WTi3Fg9DkfAM4D9R+xevFTIUqlZaBXkmTe7r3bJbRF5IrNXoSRnKaP15tMIFiYkVnWNY ogTg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9LQqDHXEgL6LiB57pCZtaVfFlM3e0/qvSy3++tYrh7M=; fh=aoCLf1Edz4Rle34WZwaA8jyeqdGNTlg5n/XvzX2zU9I=; b=YFj2ghHrTVvlNtD6alEHmcZ8kFLEiJt/gySq8VdinapxXCJC+NWDZTZ2+5dfUXHvW7 xWzj/Vo2Ifa6K0EkveHzXChAclF2Dlrusn5gKRLJqQ71jq13++4dUw0t8pxZORCMg/a/ tQJVDeYZ4UECZorgM5HmhhfkhlyDGWaiLtfstbLjpyB25B/IkEznZOj9P2Ydh6vReKH9 QjZdfP0hkNjZHGkU8sSHZ1/WiZuVDnJHAoWp0S9iAmLXaLSYG542507bSuN0L+sHW6YR nrnDf6W2kAmf1YfJ6pyQTB+e/9oDMTgxWiZ7yYhavuxj9wyQThsOqpfqHQgVDJNRn4Ga 7mYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HuaXkKPi; 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 x34-20020a634a22000000b00553d904c946si21575256pga.514.2023.07.05.01.28.44; Wed, 05 Jul 2023 01:28:57 -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=HuaXkKPi; 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 S232387AbjGEIFy (ORCPT + 99 others); Wed, 5 Jul 2023 04:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbjGEIFx (ORCPT ); Wed, 5 Jul 2023 04:05:53 -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 A900012A for ; Wed, 5 Jul 2023 01:05:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E3A561456 for ; Wed, 5 Jul 2023 08:05:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55B03C433C7; Wed, 5 Jul 2023 08:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688544351; bh=8KCphNAk0TlE+DiBeEL+TuuxFz0PYy0g5YKTvdC+ijI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HuaXkKPi1GzQd5We+Vzc6C0n2FlJjXu+6jw6iKinzD53OAn9L8boQiXhLtvjJCpDY ZWYqzmLA0CuLGf0UDTaHT1KDAMYbOHy5YAyC0ikL1PuqWauZcavKlWMOJ8J/vVn+yK 18cQAzyQbDtKsm2qtKsVlSMPaDUZYuLEcEPrXCuskw+TRFU5kKzUzK75OuUfSpLE+t uPqfamCBDs17v5ff6PtnLxgVctp99SfmEIoSEodGUVIYBo3+vV3lPK3jc91ewf6zbA sZTv1aNVdoU6tTlV9OQVYW6RL/gDAGhwERcxAp2ZVCY/iOKfwKlcd/+f2BMQC/2WNa TfJiFMt4IkeXw== Date: Wed, 5 Jul 2023 09:05:45 +0100 From: Lee Jones To: Zheng Wang Cc: s.shtylyov@omp.ru, davem@davemloft.net, linyunsheng@huawei.com, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hackerzheng666@gmail.com, 1395428693sheep@gmail.com, alex000young@gmail.com Subject: Re: [PATCH net v3] net: ravb: Fix possible UAF bug in ravb_remove Message-ID: <20230705080545.GA589018@google.com> References: <20230311180630.4011201-1-zyytlz.wz@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230311180630.4011201-1-zyytlz.wz@163.com> 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 Sun, 12 Mar 2023, Zheng Wang wrote: > In ravb_probe, priv->work was bound with ravb_tx_timeout_work. > If timeout occurs, it will start the work. And if we call > ravb_remove without finishing the work, there may be a > use-after-free bug on ndev. > > Fix it by finishing the job before cleanup in ravb_remove. > > Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") > Signed-off-by: Zheng Wang > Reviewed-by: Sergey Shtylyov > --- > v3: > - fix typo in commit message > v2: > - stop dev_watchdog so that handle no more timeout work suggested by Yunsheng Lin, > add an empty line to make code clear suggested by Sergey Shtylyov > --- > drivers/net/ethernet/renesas/ravb_main.c | 4 ++++ > 1 file changed, 4 insertions(+) Was a follow-up to this ever sent? -- Lee Jones [李琼斯]