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 882FF34844F for ; Wed, 24 Dec 2025 13:12:07 +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=1766581927; cv=none; b=dwnSfAdJ8hnSKq2+hlMp6Lvq01XyeekFIT3uI3zqKAXZtTsb58WM6IHImXYI/QXlWAaTa+DmVa/RxowJpCDQJU9fmK0Uad92JNm5sN5N7k7xdvIieXyyFtLA5n+aDlhp5l5FFUHaOPKZjd23znLyJ8bQDmQIXAy1vIdrunlkriU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581927; c=relaxed/simple; bh=gZKvnx9hxGSfMLNRvA/79IpYNU3BwiQYDPQ1GLmXYxc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a20319tTxvyEkcuSJ3M0kS+t1HTIRsJ1h3oIhIt5y+rtw5U7ihIy0G5pKTKNmECKSOKVARBydMuf8Bav/2OHVZVMYjPMrYPe0Uw33+grP9tDzjVXh2GZ87XzE5a2frMEg0QxfjbkJPCcHoQ7in09JTmiGcC8yoYkbTKEfrJE1Ks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Vl70hUdP; 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="Vl70hUdP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14A84C4CEFB; Wed, 24 Dec 2025 13:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581927; bh=gZKvnx9hxGSfMLNRvA/79IpYNU3BwiQYDPQ1GLmXYxc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=Vl70hUdPmoboINEiRBDnrSA9vXbvhqA8PjjerHL8ZjfL8m8uo4f5EfjHEOElxc4lr Fw5X2rdW5Uj5calr4mWFebOq0TCmAzfvw8aU59WH8zhmIel+mCWq3yQrj98o8jiMEY VTWYx0ylS1R14UD5E0Fu0MvlXpZ7NKUqHFcyYyr0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54154: scsi: target: core: Fix target_cmd_counter leak Date: Wed, 24 Dec 2025 14:07:51 +0100 Message-ID: <2025122427-CVE-2023-54154-bc1e@gregkh> X-Mailer: git-send-email 2.52.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=3228; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JxPOWvNvxs48/wS4YFOj9x6LoWQ+zqmZPaZWYOsiU88=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT4Mdr/fH+h7pdD3+xJFpUW7GYgkVpyKF8gk5e+u/2 KblWZ7oiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInEcjDMT7y9O7dEa/4Mx9l+ C3WDMvctyp6UzDDPwOv/jOPfj6ytn3exuffkkd098g25AA== 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: scsi: target: core: Fix target_cmd_counter leak The target_cmd_counter struct allocated via target_alloc_cmd_counter() is never freed, resulting in leaks across various transport types, e.g.: unreferenced object 0xffff88801f920120 (size 96): comm "sh", pid 102, jiffies 4294892535 (age 713.412s) hex dump (first 32 bytes): 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 38 01 92 1f 80 88 ff ff ........8....... backtrace: [<00000000e58a6252>] kmalloc_trace+0x11/0x20 [<0000000043af4b2f>] target_alloc_cmd_counter+0x17/0x90 [target_core_mod] [<000000007da2dfa7>] target_setup_session+0x2d/0x140 [target_core_mod] [<0000000068feef86>] tcm_loop_tpg_nexus_store+0x19b/0x350 [tcm_loop] [<000000006a80e021>] configfs_write_iter+0xb1/0x120 [<00000000e9f4d860>] vfs_write+0x2e4/0x3c0 [<000000008143433b>] ksys_write+0x80/0xb0 [<00000000a7df29b2>] do_syscall_64+0x42/0x90 [<0000000053f45fb8>] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Free the structure alongside the corresponding iscsit_conn / se_sess parent. The Linux kernel CVE team has assigned CVE-2023-54154 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.28 with commit 76b77646f17118f5babe93c032e6b7a53bbde3b9 and fixed in 6.1.55 with commit 1cd41d1669bcbc5052afa897f85608a62ff3fb30 Issue introduced in 6.4 with commit becd9be6069e7b183c084f460f0eb363e43cc487 and fixed in 6.5.5 with commit f84639c5ac5f4f95b3992da1af4ff382ebf2e819 Issue introduced in 6.4 with commit becd9be6069e7b183c084f460f0eb363e43cc487 and fixed in 6.6 with commit d14e3e553e05cb763964c991fe6acb0a6a1c6f9c Issue introduced in 6.2.15 with commit bc5ebf93ae23a928303b3643c6f4c4da2f769e7c Issue introduced in 6.3.2 with commit 1eaaf1b828cdaa58abccc68962d24005fd5e8852 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-2023-54154 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/target/target_core_transport.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/1cd41d1669bcbc5052afa897f85608a62ff3fb30 https://git.kernel.org/stable/c/f84639c5ac5f4f95b3992da1af4ff382ebf2e819 https://git.kernel.org/stable/c/d14e3e553e05cb763964c991fe6acb0a6a1c6f9c