Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3552066ioa; Tue, 26 Apr 2022 06:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyykzEWGAIVAncZ/rtfhPlgzakpw6ToKf7axTDt03AjzqTng2O7+Wn+/4mwbXht9yU62FIL X-Received: by 2002:aa7:cc02:0:b0:411:487e:36fe with SMTP id q2-20020aa7cc02000000b00411487e36femr24738096edt.338.1650978004584; Tue, 26 Apr 2022 06:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650978004; cv=none; d=google.com; s=arc-20160816; b=WN8+sAX3fv4voO4AK0NA9f4MTiR7Vdepu1liJLPUjjv8nyiEwhjqTc1YnHsXnwCeuC zny1AsefAXITmPTDFbQ1Xa45fuWppX8NLOqH8FE9zUd6wpB1k3Dj60F4nA4CShvO5zbm 7SjCZ6bZ2ruV1bCWWRgzisjsCx1Iv3U3Kw7ktZWaBrcQ8q0VDFoGrxoa7WVoaQ7ru+Xf WS+emj0kMCNzHS7U3aE0Hpx1JpJnxK6HHVMFjk5F2shuUo278kXjNAE8ucAtcdVflH4Y RWwT6MZO93d+2HjBaFR4OALsbBOkQUmCGmF/d+E260OWVcQB1xia9/48LZisQcGDS1pO 2N2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=M46OjQcYKWheLegKM/xCuILXvEIxS7OTq9wgg1Slupg=; b=X4p/eJo3ogIkoe6xzyEIqzQ2aUWctOGHn6EwMB0J80UFB4l4v9qHC5MyiXarIKz52x h6Llvu0CQRKGAn8bvFvFaQutzwR+q3yyVjzfCOVWFwc5FQScFbHOActZAzbEjmB/dYbD VCV2hFE27yDMzgaUdMzfU/EODK7H3u1piX5F0FtT20ZdeHNm6F6eJAocY32gtc9VW4NN gtb1OmAszzAFEWCE6Zv8/L2l+Nn0wObU8fyojlwXi3M+O9MBo3uXejE6mh1ISoez3hVU nJ5hNdmIUFE4EwsgAFhwHZlArzij6CRRZSqr/k73xBSMSMWxu1HFkhFiKgEBL0R5hMqh S2gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rFBZM+yB; 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 y9-20020a056402440900b0042600b03337si549488eda.469.2022.04.26.05.59.40; Tue, 26 Apr 2022 06:00: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=rFBZM+yB; 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 S1344359AbiDZHxf (ORCPT + 99 others); Tue, 26 Apr 2022 03:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243960AbiDZHx0 (ORCPT ); Tue, 26 Apr 2022 03:53:26 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 128E9E0A8; Tue, 26 Apr 2022 00:50:13 -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 ams.source.kernel.org (Postfix) with ESMTPS id 4559AB81AD0; Tue, 26 Apr 2022 07:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 0A045C385A4; Tue, 26 Apr 2022 07:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650959411; bh=SyM96kAlZhvwbA5ou/RttRY98K2MFlzaVkmgUbGsriI=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=rFBZM+yBP5iVW67WiVrjwydPVcZvUybbWUcInrLiw1+tr2CE1Ze9R1j7nvJxwIDkd ZoNBIWeP8XJSwdYx+gj+n8pe5rIZbGTE9aLZCD2T7VSkzGQzw7uYTPJwCU64nfI82N vfIDNoxRSES/7X5uSZsFvFjv2QDCRa5kEq+a4jGlc7CdNQ1ENm2jxeYeTLSKaXXqex lgFcpNJvaFZzv3qroZTdfQ/8218NUSzUZQIjsbT5ebjqSCBZGyZPJJwR0LXi+E44XN RlEC576i1TtjXbpftHX0EmtmOi7jANbAwzonpu9VcPFYIwWD0z98lY5qrtouq2CSEe tXNiYXt9DqaMg== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id DE1B5E6D402; Tue, 26 Apr 2022 07:50:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v0] mctp: defer the kfree of object mdev->addrs From: patchwork-bot+netdevbpf@kernel.org Message-Id: <165095941090.3686.1103250887116949143.git-patchwork-notify@kernel.org> Date: Tue, 26 Apr 2022 07:50:10 +0000 References: <20220422114340.32346-1-linma@zju.edu.cn> In-Reply-To: <20220422114340.32346-1-linma@zju.edu.cn> To: Lin Ma Cc: jk@codeconstruct.com.au, matt@codeconstruct.com.au, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Spam-Status: No, score=-7.7 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 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 Hello: This patch was applied to netdev/net.git (master) by Paolo Abeni : On Fri, 22 Apr 2022 19:43:40 +0800 you wrote: > The function mctp_unregister() reclaims the device's relevant resource > when a netcard detaches. However, a running routine may be unaware of > this and cause the use-after-free of the mdev->addrs object. > > The race condition can be demonstrated below > > cleanup thread another thread > | > unregister_netdev() | mctp_sendmsg() > ... | ... > mctp_unregister() | rt = mctp_route_lookup() > ... | mctl_local_output() > kfree(mdev->addrs) | ... > | saddr = rt->dev->addrs[0]; > | > > [...] Here is the summary with links: - [v0] mctp: defer the kfree of object mdev->addrs https://git.kernel.org/netdev/net/c/b561275d633b You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html