From mboxrd@z Thu Jan 1 00:00:00 1970 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 5A93E210E4 for ; Thu, 4 Apr 2024 08:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712219048; cv=none; b=lF2wMRfDN1iR+IHa8xiAMDc5HlRzB+7e152lAyURC8GaPHeYWdYEsQNgCZfvM+FboZhVpNvJznAvfCtUHbTtOacZwlnQTJIJ+cJIPZvxHixu5gxmo4eiz4xiWPoEldJSALW6eZxXUm/ZxTFPzEjKHro8cL9EdE9ofchqlyzpKlY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712219048; c=relaxed/simple; bh=D9DYizEZDAB89opehCc0TA6iDuxCLKUYdvC/tbKMim4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WR+N4WA0PkzIxcxWCusDfOiFmH7i8NFITjvNKZ8PewZJty/6VWZHYSpQ4RlQAwbtvK8l/eeLYJY+i8Dzx7YepkDEmiZV9Tvv8BtZ/kfrs5TSnUepqTrDja1Hpxzm32zCsYzhmmzVLLWrEwVJYIGSpsDNpqTa032beZX8JDYOCHM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WRnn/6h+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WRnn/6h+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C73F2C433F1; Thu, 4 Apr 2024 08:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712219048; bh=D9DYizEZDAB89opehCc0TA6iDuxCLKUYdvC/tbKMim4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=WRnn/6h+RRGPQlJaFo6hpVh93nqifiX+VEJM/X38En8CjXHYmsDNLg739p1flyZRE UhZ2sqO4oV+7YLL49h9CQK0KwX1KXm4viVok7P0If4TX2sRZ1cnZmh5CNjpkpDGU5S Xs8gVr7rREPGiHTCvXkjgtNClw5BDoVuruvZzFCM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26801: Bluetooth: Avoid potential use-after-free in hci_error_reset Date: Thu, 4 Apr 2024 10:23:18 +0200 Message-ID: <2024040403-CVE-2024-26801-da9f@gregkh> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3489; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=D9DYizEZDAB89opehCc0TA6iDuxCLKUYdvC/tbKMim4=; b=owGbwMvMwCRo6H6F97bub03G02pJDGl8yemsHde2VfhP72pU+19fen3aVJVLkrnLGnaW1Mf7X 7pg8u1ARywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkwgGGOVxJ28W2Clmpi2/3 /nfhqtVUtp5wIYZ5mhHBRX4XFc15IyvObt8uUb+wUUgfAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: Avoid potential use-after-free in hci_error_reset 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 This patch holds the reference count on the hci_dev while processing a HCI_EV_HARDWARE_ERROR event to avoid potential crash. The Linux kernel CVE team has assigned CVE-2024-26801 to this issue. Affected and fixed versions =========================== Issue introduced in 4.0 with commit c7741d16a57c and fixed in 4.19.309 with commit e0b278650f07 Issue introduced in 4.0 with commit c7741d16a57c and fixed in 5.4.271 with commit 98fb98fd37e4 Issue introduced in 4.0 with commit c7741d16a57c and fixed in 5.10.212 with commit 6dd0a9dfa99f Issue introduced in 4.0 with commit c7741d16a57c and fixed in 5.15.151 with commit da4569d450b1 Issue introduced in 4.0 with commit c7741d16a57c and fixed in 6.1.81 with commit 45085686b955 Issue introduced in 4.0 with commit c7741d16a57c and fixed in 6.6.21 with commit 2ab9a19d896f Issue introduced in 4.0 with commit c7741d16a57c and fixed in 6.7.9 with commit dd594cdc24f2 Issue introduced in 4.0 with commit c7741d16a57c and fixed in 6.8 with commit 2449007d3f73 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-26801 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/bluetooth/hci_core.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e0b278650f07acf2e0932149183458468a731c03 https://git.kernel.org/stable/c/98fb98fd37e42fd4ce13ff657ea64503e24b6090 https://git.kernel.org/stable/c/6dd0a9dfa99f8990a08eb8fdd8e79bee31c7d8e2 https://git.kernel.org/stable/c/da4569d450b193e39e87119fd316c0291b585d14 https://git.kernel.org/stable/c/45085686b9559bfbe3a4f41d3d695a520668f5e1 https://git.kernel.org/stable/c/2ab9a19d896f5a0dd386e1f001c5309bc35f433b https://git.kernel.org/stable/c/dd594cdc24f2e48dab441732e6dfcafd6b0711d1 https://git.kernel.org/stable/c/2449007d3f73b2842c9734f45f0aadb522daf592