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 CC7071F5407 for ; Fri, 27 Dec 2024 14:59: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=1735311588; cv=none; b=jQ95NyFZF2at3c8OVQWL+FyIliy4yeuC1BhoTOA69+CDi1TxnWhDQIXyjOFKrnZdSFdBUHC92t1dD3ceBM7lZn4M6KtPS5s/3FZeMy7o6tBHAfDU352SMQJhaFfNW7GxUBWPGPhIFbS/AHUfu9PczX/mp2v8R1RurHh+c5ubkzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311588; c=relaxed/simple; bh=PphAeedyYIxW8n/1ycqkUcrNT4gFV/XP4qLUD9oY2/A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qUX/iap27jndIjOwBqxLpBf36cPLLOXhBK497p0BEZmWd2JZIHhYKxzvqpMVMpHlRcrlO5DZPcmmTQa4UynH6APY6fVcdtzzKelo4/B72BglHxuBvjUm7n48YNYV50MSkhA6NBwtTxF4BUqdZZdS8eAVLHAju4YGu+kGZT2QHWk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=W5HP3AcY; 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="W5HP3AcY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E58B5C4CED0; Fri, 27 Dec 2024 14:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311588; bh=PphAeedyYIxW8n/1ycqkUcrNT4gFV/XP4qLUD9oY2/A=; h=From:To:Cc:Subject:Date:Reply-to:From; b=W5HP3AcYS/3hsmhfD1sVm9ggKriqcySvNJsXTxXZUC1Yy7ZA3b7/715eEzhzBMkgA EDaXfltcYnU9uRjX6bTQthLtILalZc/sLFiDxuMMYnTaouBbZICNT1qB/QSX5J0Ak8 VqSKgwVLZyOkX7qKKTTWrGEUzt0awTZVBmK7Lmwo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56604: Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() Date: Fri, 27 Dec 2024 15:51:11 +0100 Message-ID: <2024122704-CVE-2024-56604-8494@gregkh> X-Mailer: git-send-email 2.47.1 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=2205; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PphAeedyYIxW8n/1ycqkUcrNT4gFV/XP4qLUD9oY2/A=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5+26ImAVK7+OuOVv8YkHUuR+mZ1vn7ovcUmhVy/doz bYr/uERHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRuBiG+WH75765VxHHZFDe rRTHvaDSZ9rm2QwLlvE/c19qrDDpwYkMeec/F6vXq14LBAA= 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: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc() bt_sock_alloc() attaches allocated sk object to the provided sock object. If rfcomm_dlc_alloc() fails, we release the sk object, but leave the dangling pointer in the sock object, which may cause use-after-free. Fix this by swapping calls to bt_sock_alloc() and rfcomm_dlc_alloc(). The Linux kernel CVE team has assigned CVE-2024-56604 to this issue. Affected and fixed versions =========================== Fixed in 6.1.120 with commit ac3eaac4cf142a15fe67be747a682b1416efeb6e Fixed in 6.6.66 with commit 6021ccc2471b7b95e29b7cfc7938e042bf56e281 Fixed in 6.12.5 with commit 32df687e129ef0f9afcbcc914f7c32deb28fd481 Fixed in 6.13-rc1 with commit 3945c799f12b8d1f49a3b48369ca494d981ac465 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-56604 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/sock.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/ac3eaac4cf142a15fe67be747a682b1416efeb6e https://git.kernel.org/stable/c/6021ccc2471b7b95e29b7cfc7938e042bf56e281 https://git.kernel.org/stable/c/32df687e129ef0f9afcbcc914f7c32deb28fd481 https://git.kernel.org/stable/c/3945c799f12b8d1f49a3b48369ca494d981ac465