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 68E45433D1 for ; Thu, 1 May 2025 12:56:48 +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=1746104208; cv=none; b=EyN3I5aZqMhfDaSZk3N1uCC09NbLv2dNjusULGuVVg0QxkPbGNkl5bwSHCeP6047ftFgnhGNouAKCoNKkj1uzZ/oug2fc1nqNRAp/Ipzyj+4OeGeTcUSJqqYYeu4p196QaxOh5e2xpr799QB5Qqf+z4hEyXTpWBSt/p0S/E3vxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104208; c=relaxed/simple; bh=ItVJKO+8/3NVRT7WD+0v7en3Tuv56pxcAJzepydLVYY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PavSh8o+S7Yqn0YaeUfWsV3pPVnEU+MehHb5loSw6MU5mF/dUu+SQSWUl7HU+Zpi3mT/o/wAAKC7p9VAlR6AplekNd1WkQY4elswgKwV8MPd7lKnfAcqQV8C+fAf059U2LJsLt59lqmY+nCXnL2XynOdnuE7dyxtARzMbfoCJM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HxqR8PjA; 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="HxqR8PjA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7136AC4CEE3; Thu, 1 May 2025 12:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104207; bh=ItVJKO+8/3NVRT7WD+0v7en3Tuv56pxcAJzepydLVYY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HxqR8PjAshTfE4j9jd+yhbw5FILhFpuZ8Tnj3SHhgQWEDa68sQOu4AelqylSx8EAG m6pHt83uPAwbs0o9IOqUodD9vnqPzodkNL6rdHxgcUew5pEEtV8h79bwrEzviWgBqh uEV7Syb3NWEbX+jcUIuIal0rmgC4TU/iDkMMfF9Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-23139: Bluetooth: hci_uart: Fix another race during initialization Date: Thu, 1 May 2025 14:56:19 +0200 Message-ID: <2025050121-CVE-2025-23139-3932@gregkh> X-Mailer: git-send-email 2.49.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=3541; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9ZA4DBlodsSCg0H11g1mX/u0JFkkCIxyrOHMfYRWMk0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnC+aXq32Uu7TpUybrnZ7uSJGPYntk2M5JMbk9PPi9jn cfAdjSiI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZy4wPDPMX0tAX27ivFgua4 Tz224+rVzxM7gxnmSify359wdMGNzil63Qf+Tvqzm/2pFgA= 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_uart: Fix another race during initialization Do not set 'HCI_UART_PROTO_READY' before call 'hci_uart_register_dev()'. Possible race is when someone calls 'hci_tty_uart_close()' after this bit is set, but 'hci_uart_register_dev()' wasn't done. This leads to access to uninitialized fields. To fix it let's set this bit after device was registered (as before patch c411c62cc133) and to fix previous problem let's add one more bit in addition to 'HCI_UART_PROTO_READY' which allows to perform power up without original bit set (pls see commit c411c62cc133). Crash backtrace from syzbot report: RIP: 0010:skb_queue_empty_lockless include/linux/skbuff.h:1887 [inline] RIP: 0010:skb_queue_purge_reason+0x6d/0x140 net/core/skbuff.c:3936 Call Trace: skb_queue_purge include/linux/skbuff.h:3364 [inline] mrvl_close+0x2f/0x90 drivers/bluetooth/hci_mrvl.c:100 hci_uart_tty_close+0xb6/0x120 drivers/bluetooth/hci_ldisc.c:557 tty_ldisc_close drivers/tty/tty_ldisc.c:455 [inline] tty_ldisc_kill+0x66/0xc0 drivers/tty/tty_ldisc.c:613 tty_ldisc_release+0xc9/0x120 drivers/tty/tty_ldisc.c:781 tty_release_struct+0x10/0x80 drivers/tty/tty_io.c:1690 tty_release+0x4ef/0x640 drivers/tty/tty_io.c:1861 __fput+0x86/0x2a0 fs/file_table.c:450 task_work_run+0x82/0xb0 kernel/task_work.c:239 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xa3/0x1b0 kernel/entry/common.c:218 do_syscall_64+0x9a/0x190 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f The Linux kernel CVE team has assigned CVE-2025-23139 to this issue. Affected and fixed versions =========================== Issue fixed in mainline with commit 5df5daf 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-2025-23139 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: drivers/bluetooth/hci_ldisc.c drivers/bluetooth/hci_uart.h 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/80f14e9de6a43a0bd8194cad1003a3e6dcbc3984 https://git.kernel.org/stable/c/02e1bcdfdf769974e7e9fa285e295cd9852e2a38 https://git.kernel.org/stable/c/281782d2c6730241e300d630bb9f200d831ede71 https://git.kernel.org/stable/c/8e5aff600539e5faea294d9612cca50220e602b8 https://git.kernel.org/stable/c/db7509fa110dd9b11134b75894677f30353b2c51 https://git.kernel.org/stable/c/5df5dafc171b90d0b8d51547a82657cd5a1986c7