Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7980780rdb; Thu, 4 Jan 2024 14:20:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFw1aALM+g2yjEvhiUwZ8iwwEUn89xBydx7l6kTYWNdMaMwQgy3X7p6omiRZMK9bUgwVynH X-Received: by 2002:a05:6830:1353:b0:6db:fb07:91c4 with SMTP id r19-20020a056830135300b006dbfb0791c4mr1359732otq.73.1704406854018; Thu, 04 Jan 2024 14:20:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704406853; cv=none; d=google.com; s=arc-20160816; b=ooWhJv/1lORCGZ7pLhMnPnSuhESHtp6xSl94YpOsn9Hdx7jo05pcaQQt4dOqgOk8mb YiI3+dhxFmqRD3UqWCcdO6jE79X4rdEq53mns/PwBhj/GZYhst5FSbAejgrE6cDdhM1T bns907vto6EpDTu9Q9q9Qa6SirkhdSwTO/c/2q5H2NvKn1zXFcHjKXk8F6JcLjAwE1TC IJQReHvU4SjFHcYzAzzkGg5dV8XxxjRLOLyYHNvNRS4UXpxTNt+S5KIG+K2Mpo3k+Ibl pvG3o/9OaQ5oET6uJ6+brlKX14ZcYCf27zXr8WvPH5Ha/xCkWN5rhdkLN1fXyE6SdyA0 CmjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=C4aP9W3OCGYtBJ8ullnFt/6Uc6KIP/oWA6FM3zmtpBo=; fh=3yrJs5LiqXv6qEx9h4RX58EtmC2FhbGHRTm7q6ospq0=; b=ySEBQMJsZDiPIONPsdrJ+CXPuDMXeCiPgbKHsaFJFjrHj1lTQokyhdreiFrOzCvE5F TYSTI2lDC+fU6ReIQSLHPODLIdfBHIJ8sbqu1mNF0vCmIZEFagP5Znzc+Mcm/B1c5szF vH7hu9eVe2aFknVWuLzR85IA/5Acfe9Uspl85B/I7s8DckqJDD6vHx5hKKNSDEu/vZMP fNuN5EIcOjFNbnvFThVU6eeEPAadkyk+1RUsptkuqZYUdQKVXElRwa2T5vK9Jbej+0jZ K67qVaSntIjKi2PSqaYis3hsARoK4mHQ2jjAa7LVdemOFU1wCrNcsd7JV6u1EckkRX8B uOug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VBk9numn; spf=pass (google.com: domain of linux-kernel+bounces-17281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w35-20020a05622a192300b004261b5ebfe9si498218qtc.151.2024.01.04.14.20.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 14:20:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VBk9numn; spf=pass (google.com: domain of linux-kernel+bounces-17281-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17281-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C27B21C20371 for ; Thu, 4 Jan 2024 22:20:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9C1D2CCD8; Thu, 4 Jan 2024 22:20:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VBk9numn" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E65902C857; Thu, 4 Jan 2024 22:20:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 67BD3C433C9; Thu, 4 Jan 2024 22:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704406826; bh=Jn4T0B5wwaKEY8ncGAfsMVFvyghd4aVAmoAoz7sR8iI=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=VBk9numn2jGap9l0Um73an2WgbasH1U8Pkx/mij2HeQKbAjZBwoNEw7Vwq+LFaygv UauwQrEw2juDjMq+fzL4f6NaMOhZeegoibjd3pCVAUM60LV4iaMQ+Bqh0knMV9YXwC rACnVzQXLWJhcj3kQ3qSnO+3K0U/7UgqRAcEaJVAHihmQ7sltvyzq5Dn29Ov9U6VIf rNUoT6wPYlKyycWI9VJxzpv8xHFtjqiH+cOQuhrRk1R/bulo3a8ra1ry96X2aS0YlB 6Dj+WWbw5dKDVIZ+pEagREj1xbFaoElS6W5GZJDA+XEG3mvUu5/zpidX0eOihPUxFS Hax6yFvd2k0+g== 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 4FBB9C3959F; Thu, 4 Jan 2024 22:20:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] Bluetooth: Avoid potential use-after-free in hci_error_reset From: patchwork-bot+bluetooth@kernel.org Message-Id: <170440682632.8457.15681827016026801324.git-patchwork-notify@kernel.org> Date: Thu, 04 Jan 2024 22:20:26 +0000 References: <20240104115453.1.Iaa08c695d3dcf819910ea723c3eb502935638172@changeid> In-Reply-To: <20240104115453.1.Iaa08c695d3dcf819910ea723c3eb502935638172@changeid> To: Ying Hsu Cc: linux-bluetooth@vger.kernel.org, luiz.dentz@gmail.com, linux-kernel@vger.kernel.org, chromeos-bluetooth-upstreaming@chromium.org Hello: This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz : On Thu, 4 Jan 2024 11:56:32 +0000 you wrote: > While handling the HCI_EV_HARDWARE_ERROR event, if the underlying > BT controller is not responding, the GPIO reset mechanism would > free the hci_dev and lead to a use-after-free in hci_error_reset. > > Here's the call trace observed on a ChromeOS device with Intel AX201: > queue_work_on+0x3e/0x6c > __hci_cmd_sync_sk+0x2ee/0x4c0 [bluetooth ] > ? init_wait_entry+0x31/0x31 > __hci_cmd_sync+0x16/0x20 [bluetooth ] > hci_error_reset+0x4f/0xa4 [bluetooth ] > process_one_work+0x1d8/0x33f > worker_thread+0x21b/0x373 > kthread+0x13a/0x152 > ? pr_cont_work+0x54/0x54 > ? kthread_blkcg+0x31/0x31 > ret_from_fork+0x1f/0x30 > > [...] Here is the summary with links: - Bluetooth: Avoid potential use-after-free in hci_error_reset https://git.kernel.org/bluetooth/bluetooth-next/c/c6d011a4e7d3 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html