Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 759BC3594A for ; Sun, 18 Oct 2026 15:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792339097; cv=none; b=Dxh3XWkJcBk4mNyFgJpIOaBSU5HJO8WfVDdKxT+bwBnOa3KhsNlgViriGkT01+WBzwn2F+QVjBrQHQXw3dsGPZcINaSvDtoL2rldpw/pF0bAu1wcA54Wv7mAPokcLyV/hPIwEnt1LMj24kkoCs8qgxR4kex2KYl1Uc75q9o7wdo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792339097; c=relaxed/simple; bh=3y9wDJx89016amYZsA6Macw5neNXr+/BFJrszCQ/qTA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QpeM8CQGx1SJj2dpFc8/xJgZZVz9C31Lp8sZSHhl/wl2nBmIhkmibFZPFf0FQl1qAooTba+ZkdZEvDF2uCHxYhAc4GdKi8uHOeHMniG/AavFp4cGmZxJh0Owl3lAAaBM/MsXDumGqs9pzCeOjhYs/h11ZE5UZ2WY5C/6xHUc8lE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JbclUjyR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JbclUjyR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA4821F000C4; Sun, 18 Oct 2026 15:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792339096; bh=JBVkQ/arkHeFBAfAHJNUrtGUbd90bPltErdCozTibRI=; h=From:To:Cc:Subject:Date:Reply-To; b=JbclUjyRSlCQO3vR7+zyZ7Ry1Ug69+DfFQZ2Rj72UXeNDJFraikkN6foRc+toNsZI r8oay+l+s6Pgws517jlmIhW1fl0Xd/a5Cp6tTeMTf73ZCmksW9XU7DlN7IrHZBSkom ROXOjooj1QYokfhVNx/GXYl9wc0wOAJ/kcX1xRFo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98739: Bluetooth: RFCOMM: Fix initial port reference race Date: Sun, 18 Oct 2026 17:45:14 +0200 Message-ID: <2026101812-CVE-2026-98739-5a6e@gregkh> X-Mailer: git-send-email 2.56.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=3913; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YPMBFM5RspF89wZCqx+5dZ4cpfb3YcOmY4P8zde6xlI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXvrU8V11fc6ndHu6/XmLLcJJtxafvbPh5T+x68nPf 4ioL+q53xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATecXAML+6LOhAbNuXVmO2 1T8NHx+d7so0+SrDfG/23Bztklsu+xt2t37sTrUVLFq6GwA= 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: RFCOMM: Fix initial port reference race For RFCOMM_RELEASE_ONHUP devices, rfcomm_tty_install() and __rfcomm_release_dev() both use RFCOMM_TTY_OWNED to decide who drops the initial tty_port reference. The release path tests the bit separately from the install path setting it, so both can drop that reference. The synchronous hangup does not prevent this race: port->tty is not assigned until tty_port_open(), after installation. The following interleaving is possible: 1. Install and release each obtain a reference with rfcomm_dev_get(). 2. Release observes RFCOMM_TTY_OWNED clear. 3. Install sets RFCOMM_TTY_OWNED and drops the initial reference. 4. Release drops the same initial reference again. 5. TTY cleanup drops its reference and frees the device. 6. Release performs its final tty_port_put() on the freed port. KASAN reported: BUG: KASAN: slab-use-after-free in tty_port_put+0x22/0x190 Write of size 4 at addr ffff8881001d3d5c by task poc/92 Call Trace: tty_port_put+0x22/0x190 rfcomm_dev_ioctl+0x1d4/0x1930 sock_do_ioctl+0x110/0x260 sock_ioctl+0x380/0x590 __x64_sys_ioctl+0x134/0x1c0 Allocated by task 88: rfcomm_dev_ioctl+0x8f6/0x1930 sock_do_ioctl+0x110/0x260 sock_ioctl+0x380/0x590 __x64_sys_ioctl+0x134/0x1c0 Freed by task 65: kfree+0x131/0x3c0 rfcomm_dev_destruct+0x23b/0x2f0 release_one_tty+0xc1/0x370 process_one_work+0x661/0x1090 Use test_and_set_bit() in both paths so that only the caller that changes RFCOMM_TTY_OWNED from clear to set drops the initial reference. Each path keeps its own lookup reference until release or TTY cleanup, preserving the existing callback ordering and error handling. The Linux kernel CVE team has assigned CVE-2026-98739 to this issue. Affected and fixed versions =========================== Issue introduced in 3.15 with commit 80ea73378af46b0023eb2f400d26c2a60248ffaa and fixed in 6.12.113 with commit a03ccf1ab77380d4c4a3c56552e12de4a83efa21 Issue introduced in 3.15 with commit 80ea73378af46b0023eb2f400d26c2a60248ffaa and fixed in 6.18.56 with commit 0a554901bd227537f79220443b2b36d585d62893 Issue introduced in 3.15 with commit 80ea73378af46b0023eb2f400d26c2a60248ffaa and fixed in 7.2.10 with commit e5aa7fbf7a4446bb89f0b8394b2dfc1a6b6aba5b Issue introduced in 3.15 with commit 80ea73378af46b0023eb2f400d26c2a60248ffaa and fixed in 7.3-rc6 with commit 2d696c1ed3468dcb62578a3911e687110d463520 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-98739 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/rfcomm/tty.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/a03ccf1ab77380d4c4a3c56552e12de4a83efa21 https://git.kernel.org/stable/c/0a554901bd227537f79220443b2b36d585d62893 https://git.kernel.org/stable/c/e5aa7fbf7a4446bb89f0b8394b2dfc1a6b6aba5b https://git.kernel.org/stable/c/2d696c1ed3468dcb62578a3911e687110d463520