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 B19853C3425 for ; Fri, 1 May 2026 14:18:55 +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=1777645135; cv=none; b=Dokv6wqPxu1b7/ZXvm35QnnBALuu1f5BN0RZyHnw/MxBia2nkTm1Cuwgt7+bE9RWcGegKTkGrJ8LH5/zWwh1wjhI16UeQx9uihhQn75wA5Vc3fr3R5Qi9WS46UQ/cBQ811bZBV+vWgpi/WGSy3cpU1IqM0ZUPjgnhhmtPpHw7OI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645135; c=relaxed/simple; bh=rrlR58LKdpKYq6I5V0nVBUxySHkx8HmqpDeG9QCp3N8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BvtQeHDfoCCUMsSAwHGZQsuliY9Jw1ovnPynrM/dW0l/CUmCncaF/cqTMqjjOyKt8TOmFdQH9glBWaxf7KzFp0KsvPKNku1GmX7iwUAU685qXggQk2LE2cbYzr2ctHYuUoe34AYhxw7MboR/g7e7QCrfIYN6u0vQO2mBuhRLBiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ju3jnciV; 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="Ju3jnciV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D6C6C2BCB4; Fri, 1 May 2026 14:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645135; bh=rrlR58LKdpKYq6I5V0nVBUxySHkx8HmqpDeG9QCp3N8=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Ju3jnciVQlmywnQUvomzqDhg3cSIlmW9Ohb9BAmcZNZHrRjiRPWiuyd1mNsGvD7Lk POH8bB5/yEAUN7QoUkPZBDj1KgJKET0bgESZe6qmtf0kLXix3UoCihQpZLlpCrtuJ+ L9i8eJWaQ7DBDTXdzLq5OFsDPL2LIiEXeU8Mgo2Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31771: Bluetooth: hci_event: move wake reason storage into validated event handlers Date: Fri, 1 May 2026 16:15:22 +0200 Message-ID: <2026050148-CVE-2026-31771-9cd0@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3046; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oiPYxY7eqI3npE4cY8Xns5jw5M4lbIRf2DiQIiO3xiQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftkYIyvy82lnWJJg7W7DpL8MhMctZK59V2rByf5s6K /O3kbZfRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyE7TzDPLvOF8/P7tc5darQ dtqqyyanj94+v5Zhfvqc61t9nrTqCF95+Dqb+cUmG+kFcQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_event: move wake reason storage into validated event handlers hci_store_wake_reason() is called from hci_event_packet() immediately after stripping the HCI event header but before hci_event_func() enforces the per-event minimum payload length from hci_ev_table. This means a short HCI event frame can reach bacpy() before any bounds check runs. Rather than duplicating skb parsing and per-event length checks inside hci_store_wake_reason(), move wake-address storage into the individual event handlers after their existing event-length validation has succeeded. Convert hci_store_wake_reason() into a small helper that only stores an already-validated bdaddr while the caller holds hci_dev_lock(). Use the same helper after hci_event_func() with a NULL address to preserve the existing unexpected-wake fallback semantics when no validated event handler records a wake address. Annotate the helper with __must_hold(&hdev->lock) and add lockdep_assert_held(&hdev->lock) so future call paths keep the lock contract explicit. Call the helper from hci_conn_request_evt(), hci_conn_complete_evt(), hci_sync_conn_complete_evt(), le_conn_complete_evt(), hci_le_adv_report_evt(), hci_le_ext_adv_report_evt(), hci_le_direct_adv_report_evt(), hci_le_pa_sync_established_evt(), and hci_le_past_received_evt(). The Linux kernel CVE team has assigned CVE-2026-31771 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 2f20216c1d6fe17c1a224f658be0dc6fab2269c7 and fixed in 6.19.12 with commit 86c8d07a64d553c41e213b52650020010f9ef23e Issue introduced in 5.10 with commit 2f20216c1d6fe17c1a224f658be0dc6fab2269c7 and fixed in 7.0 with commit 2b2bf47cd75518c36fa2d41380e4a40641cc89cd 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-2026-31771 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_event.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/86c8d07a64d553c41e213b52650020010f9ef23e https://git.kernel.org/stable/c/2b2bf47cd75518c36fa2d41380e4a40641cc89cd