Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1147118rwr; Wed, 3 May 2023 10:46:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6NYF6YilWe4GbkV9RQ8D90VZisI3c0/wIZ4b8D7zRVgNxLtEp5d96HbSs1yjBY8cay4zzb X-Received: by 2002:a17:902:e88b:b0:1ab:1241:f671 with SMTP id w11-20020a170902e88b00b001ab1241f671mr1053159plg.29.1683135973066; Wed, 03 May 2023 10:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683135973; cv=none; d=google.com; s=arc-20160816; b=urEmc3qs+fZMccBE4l+lL8MdAwQwF1Gs+QulRTAI7cHZPpNUoTh5CtRrf0JG0Wo8Me uJVTFk2XsMGoEeLhtKKCt9BA8ws6kLZlB8BxbbfEbURBLEfnlWjWl8F9+bewN34B2Hv7 UU0BwkPTV5ax0BRo1LHBRbSj2u34MMf2tuzBW4Z+5u/EDijcTl9JKifJuQAGNBcLw6+Q aRUoERk70csKVC9r2Ur6SQm/iKJWdWF2YH7e75NCyNSuQxIxJZUelUeIEp7gKXJA/yoA s8CPA3H30Zvug7Dsm8s0v/yUzRk3OlqX+cztCM4MthR3Qr6DARHKP8yulkivjVxNEvjC z4fg== 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=eiR7rW/gC9j141gM60tn+gN1mWt0MFkARI1leh88CGE=; b=yvYZprvrDrHo+GaimbIc53EDEP5s/34x2rcZi7H8vvnF97mGIsOz6xYDVkr8v0jZho z4KcL386UcoTtWsuEqWt9ZmXzRPqAgfoNFts55kkgTO0fwTZV/zqxXJ8m6/70EHOJGg0 oXnzsYxBGlzqUji6peLYu8vxHgNmuPFbkfQ5iO6N7LfcC3P204H3bq2nIIePw/NWVg/1 nPnQfII9bWzBeFdcbEG/8ZJ2OH8Uoz7JuOplL2pUtuXQUVgww1ZU+F7sQqdZP9eNVWEZ 19Nmk3L7sUrxVxj00/2IKhKYgOExc5wdQ3TyhLrl3ey7o3HBwlLXW2faVCgfjAs9JvD8 +U+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RuPD3Do2; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 u5-20020a170903124500b001aad291018fsi11997755plh.350.2023.05.03.10.46.00; Wed, 03 May 2023 10:46:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-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=RuPD3Do2; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S229805AbjECRa2 (ORCPT + 99 others); Wed, 3 May 2023 13:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjECRa1 (ORCPT ); Wed, 3 May 2023 13:30:27 -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 9C9B549CA for ; Wed, 3 May 2023 10:30:23 -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 2C9AD62F0A for ; Wed, 3 May 2023 17:30:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 6EFF7C4339B; Wed, 3 May 2023 17:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683135022; bh=BlB9wv6hz6vCIxm7pJKQ6ZwsIXIUXOnxrNgkkYz5+MA=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=RuPD3Do2XnZekv+9ikMReUXMBDb90DGFpeQ0Gs0tFfB2i8fYZUQO1HAmY2Vfif5pw 9qSp1GnrM8yqJkQfpbi3nafTV6cfKOsJiFODC3TP3w08IcyAQLo4JLMtfO/HOcJusd etDtReBYqP49SfFw8oeA9VVufK5QMMGfhsaAGST52eXHzJ/WooiR/w7FNoI+qAdDsN ImjvImDdi5M7cxb3TzrEJ6W7e3sJN2MWKxw5yM/q9SgxsfNZipVSCliviVe+ryFccK zpvABepTsL4v4VqVKnFo/P/0xU+kJrqpDTOVAeG7WUOOESHYD0+Ki5JwdFy5WZGXJP OJ3rJGFMCTUeQ== 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 4EC18C73FF3; Wed, 3 May 2023 17:30:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v4 1/4] Bluetooth: Fix potential double free caused by hci_conn_unlink From: patchwork-bot+bluetooth@kernel.org Message-Id: <168313502231.19283.12765545255824034324.git-patchwork-notify@kernel.org> Date: Wed, 03 May 2023 17:30:22 +0000 References: <20230503133937.169647-1-lrh2000@pku.edu.cn> In-Reply-To: <20230503133937.169647-1-lrh2000@pku.edu.cn> To: Ruihan Li Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, luiz.dentz@gmail.com, syzbot+690b90b14f14f43f4688@syzkaller.appspotmail.com, luiz.von.dentz@intel.com X-Spam-Status: No, score=-4.6 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-bluetooth@vger.kernel.org Hello: This series was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Wed, 3 May 2023 21:39:34 +0800 you wrote: > The hci_conn_unlink function is being called by hci_conn_del, which > means it should not call hci_conn_del with the input parameter conn > again. If it does, conn may have already been released when > hci_conn_unlink returns, leading to potential UAF and double-free > issues. > > This patch resolves the problem by modifying hci_conn_unlink to release > only conn's child links when necessary, but never release conn itself. > > [...] Here is the summary with links: - [v4,1/4] Bluetooth: Fix potential double free caused by hci_conn_unlink https://git.kernel.org/bluetooth/bluetooth-next/c/3214238e9dc7 - [v4,2/4] Bluetooth: Refcnt drop must be placed last in hci_conn_unlink https://git.kernel.org/bluetooth/bluetooth-next/c/38e9b45310de - [v4,3/4] Bluetooth: Fix UAF in hci_conn_hash_flush again https://git.kernel.org/bluetooth/bluetooth-next/c/29f883dcbfd0 - [v4,4/4] Bluetooth: Unlink CISes when LE disconnects in hci_conn_del https://git.kernel.org/bluetooth/bluetooth-next/c/e6e576ec4e72 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html