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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84B0FEB64DA for ; Wed, 5 Jul 2023 08:05:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232382AbjGEIF4 (ORCPT ); Wed, 5 Jul 2023 04:05:56 -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> 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 [李琼斯]