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 451041F5432 for ; Fri, 27 Dec 2024 14:59:51 +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=1735311592; cv=none; b=lnCI47/oZx+bs8EgKBpBicVg1CBTmqHgiBwP30rfLHYwNDSLMMU6rQbniu/swYynzMnoUZIcdECNmBLp61AYToFnJFkS9X42RdYYXYdcd32H3vKFS1lk1bGMqqz5mwk2G2OboqDUuLtcMTsKTpnHb2ezUS5NNu6yQp0lsv8XUl4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311592; c=relaxed/simple; bh=i3BSOi/UVsUPfxdUQXp42z6FnQMZtxnxQsBEeJgRpjE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S91YZv+HPPdrjD/PDoApKTCvPGSYIi0rlWQTIodtPFEav2rSfCQ23EBrZWG9n9+QNu4+zD8XzfLoJ1u0Fi++6yNB+IJxhjqrwQRuSAdpOd58GR03I+0uDuzMljLke+4KWahhHOlJm/M3PEQ+BLw/T7R6hp1J752evHsJrx2lcwU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JVGcq48G; 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="JVGcq48G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B6BCC4CED3; Fri, 27 Dec 2024 14:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311591; bh=i3BSOi/UVsUPfxdUQXp42z6FnQMZtxnxQsBEeJgRpjE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JVGcq48Gz35HCACaRKAy2jsIBagV5IHwvseVrxNvn6oK9AlZPgRZ+LOrNoD/CGps6 F6N8YJyS3flgPbNobRVuR1ONk1lQMpz0NHIS1KMW/vLSdcNCzDvCKIhxVxzbkEClo3 /5Cy1fB/Lurs3dKi3/u+vs7CpJOf+5UvMEQCfnrs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56605: Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create() Date: Fri, 27 Dec 2024 15:51:12 +0100 Message-ID: <2024122704-CVE-2024-56605-d424@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=2614; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=i3BSOi/UVsUPfxdUQXp42z6FnQMZtxnxQsBEeJgRpjE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5+24oxPkl251df+Zsf9PD4oz/VgUvDVfd0NvbenL9t bjc75weHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARj1CG+ZEWC52+vkx6cOVT /f56/fOm7MLsXxgWzGO9stTnrJlYu3Lvns6Fe3JufVZzAQA= 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: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create() bt_sock_alloc() allocates the sk object and attaches it to the provided sock object. On error l2cap_sock_alloc() frees the sk object, but the dangling pointer is still attached to the sock object, which may create use-after-free in other code. The Linux kernel CVE team has assigned CVE-2024-56605 to this issue. Affected and fixed versions =========================== Fixed in 5.4.287 with commit f6ad641646b67f29c7578dcd6c25813c7dcbf51e Fixed in 5.10.231 with commit daa13175a6dea312a76099066cb4cbd4fc959a84 Fixed in 5.15.174 with commit a8677028dd5123e5e525b8195483994d87123de4 Fixed in 6.1.120 with commit bb2f2342a6ddf7c04f9aefbbfe86104cd138e629 Fixed in 6.6.66 with commit 8ad09ddc63ace3950ac43db6fbfe25b40f589dd6 Fixed in 6.12.5 with commit 61686abc2f3c2c67822aa23ce6f160467ec83d35 Fixed in 6.13-rc1 with commit 7c4f78cdb8e7501e9f92d291a7d956591bf73be9 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-56605 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/l2cap_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/f6ad641646b67f29c7578dcd6c25813c7dcbf51e https://git.kernel.org/stable/c/daa13175a6dea312a76099066cb4cbd4fc959a84 https://git.kernel.org/stable/c/a8677028dd5123e5e525b8195483994d87123de4 https://git.kernel.org/stable/c/bb2f2342a6ddf7c04f9aefbbfe86104cd138e629 https://git.kernel.org/stable/c/8ad09ddc63ace3950ac43db6fbfe25b40f589dd6 https://git.kernel.org/stable/c/61686abc2f3c2c67822aa23ce6f160467ec83d35 https://git.kernel.org/stable/c/7c4f78cdb8e7501e9f92d291a7d956591bf73be9