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 DEE39C4332F for ; Wed, 12 Oct 2022 12:40:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbiJLMkU (ORCPT ); Wed, 12 Oct 2022 08:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbiJLMkS (ORCPT ); Wed, 12 Oct 2022 08:40:18 -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 8709376543 for ; Wed, 12 Oct 2022 05:40:16 -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 E8BC4614D0 for ; Wed, 12 Oct 2022 12:40:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 4A3D2C433C1; Wed, 12 Oct 2022 12:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665578415; bh=GN9kzDROQWsgxUwxQfV3ILI8Qveol06uco+HRzURMvY=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=J3iqKwtShhaomPjyZG9PNmbSOtzDfqpk5HjMA4GZk5zUKw4YEUTQ1dZtcY9IUvbiw oirno0bQ1m4s2K11GDqiceoqfZY9pZMR1YHJkDwcveyrwFazQCbCoStqdU0itGqksV 9JNHyChrrZYDOC0dnM2CVZFxzmpP8iPYZjdFUykfUD5ZEJn2eOfaP73BHDyZ+C5UFZ g6ZtApsYulquaUflTDg2/hmGiDW8B7FoN8maDLadwnntVkYE3BHvX2V5kBMa1SIR/Z hw4Xuv8RNHpmzqId909sdLyAYsFPeOBpzUHxLxvz55p37vEFrOMoyS5DU0AmUjZxtM nEPmCpe/mVRGA== 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 263CEE4D00C; Wed, 12 Oct 2022 12:40:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net] mctp: prevent double key removal and unref From: patchwork-bot+netdevbpf@kernel.org Message-Id: <166557841515.32004.12665127576617421909.git-patchwork-notify@kernel.org> Date: Wed, 12 Oct 2022 12:40:15 +0000 References: <20221012020851.931298-1-jk@codeconstruct.com.au> In-Reply-To: <20221012020851.931298-1-jk@codeconstruct.com.au> To: Jeremy Kerr Cc: netdev@vger.kernel.org, kuba@kernel.org, matt@codeconstruct.com.au, butterflyhuangxx@gmail.com Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello: This patch was applied to netdev/net.git (master) by David S. Miller : On Wed, 12 Oct 2022 10:08:51 +0800 you wrote: > Currently, we have a bug where a simultaneous DROPTAG ioctl and socket > close may race, as we attempt to remove a key from lists twice, and > perform an unref for each removal operation. This may result in a uaf > when we attempt the second unref. > > This change fixes the race by making __mctp_key_remove tolerant to being > called on a key that has already been removed from the socket/net lists, > and only performs the unref when we do the actual remove. We also need > to hold the list lock on the ioctl cleanup path. > > [...] Here is the summary with links: - [net] mctp: prevent double key removal and unref https://git.kernel.org/netdev/net/c/3a732b46736c You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html