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 4F13D2ECD1C for ; Fri, 25 Jul 2025 12:56:31 +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=1753448191; cv=none; b=GlUsBWyjiKhu1fKEXKqwQvCRCugbbtF+YggK1/t03CbAqezs1U5vDcnErKupw/Nit4HRhb7r8b2s0Ta39oKceqxwqEPjpK8aajI5uXePcccxFcQlBhi152HCZLzAcv1qgvgWnDutLy2DmBAO1qJ0F9u7MvWHmNvZHhJrkqjCBkU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448191; c=relaxed/simple; bh=aa63QF75J6dNLJ0PGfO/QmVRM6TwnIkil9a+lgohLrA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BIaXfKYXfxY43f5XorrbC8Nnymo9szCLBCkhsWYkBe7dCChR11CKG56R5gxtp1URstsbSCIP6gP8yq6yE61V3W2s0nEaxEtnU0Tzdzoz+LKo8CalkyfVzFRXzsqdENoa7OkGPcTyXFdrU951SMmvWx6DNj/a4WOxBysryxuspsc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NWfiBd3i; 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="NWfiBd3i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B35DBC4CEE7; Fri, 25 Jul 2025 12:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753448191; bh=aa63QF75J6dNLJ0PGfO/QmVRM6TwnIkil9a+lgohLrA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NWfiBd3ioqrMyOoCu1nV0HVpaUOqg0s8Dn7OC9CwxlRg79WKmR9BkVqqVG/4+7dLA zUd06YPP7u5U/HoX7PzodxLES+7wLAicxdbAM4ikY1tjlx7ZPzzfK9ZUXVLmD6vVzQ oa91SW4Ytp1WTJJWVBS1fnYh3GKkvxpW7GOkgzKA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38399: scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() Date: Fri, 25 Jul 2025 14:55:30 +0200 Message-ID: <2025072510-CVE-2025-38399-00ec@gregkh> X-Mailer: git-send-email 2.50.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=3108; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5mUsSL7h1wDftb74NcGd6Qzab/R27fUtWM7nNSChQ/g=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNdev83jjPX3v0XqKhdrHnKcZ/+oyBIexiSr/WLnXgS 2U0Mu/viGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIno7mNYMHO9rlBZe4bSgu12 nqYrApenb2aMZ5hfL/7aWt3Jm/WW8EIHg1V+Tekmc0sA 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: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port() The function core_scsi3_decode_spec_i_port(), in its error code path, unconditionally calls core_scsi3_lunacl_undepend_item() passing the dest_se_deve pointer, which may be NULL. This can lead to a NULL pointer dereference if dest_se_deve remains unset. SPC-3 PR SPEC_I_PT: Unable to locate dest_tpg Unable to handle kernel paging request at virtual address dfff800000000012 Call trace: core_scsi3_lunacl_undepend_item+0x2c/0xf0 [target_core_mod] (P) core_scsi3_decode_spec_i_port+0x120c/0x1c30 [target_core_mod] core_scsi3_emulate_pro_register+0x6b8/0xcd8 [target_core_mod] target_scsi3_emulate_pr_out+0x56c/0x840 [target_core_mod] Fix this by adding a NULL check before calling core_scsi3_lunacl_undepend_item() The Linux kernel CVE team has assigned CVE-2025-38399 to this issue. Affected and fixed versions =========================== Fixed in 5.10.240 with commit 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c Fixed in 5.15.187 with commit 1129e0e0a833acf90429e0f13951068d5f026e4f Fixed in 6.1.144 with commit 1627dda4d70ceb1ba62af2e401af73c09abb1eb5 Fixed in 6.6.97 with commit 55dfffc5e94730370b08de02c0cf3b7c951bbe9e Fixed in 6.12.37 with commit 7296c938df2445f342be456a6ff0b3931d97f4e5 Fixed in 6.15.6 with commit c412185d557578d3f936537ed639c4ffaaed4075 Fixed in 6.16-rc3 with commit d8ab68bdb294b09a761e967dad374f2965e1913f 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-38399 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_pr.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/70ddb8133fdb512d4b1f2b4fd1c9e518514f182c https://git.kernel.org/stable/c/1129e0e0a833acf90429e0f13951068d5f026e4f https://git.kernel.org/stable/c/1627dda4d70ceb1ba62af2e401af73c09abb1eb5 https://git.kernel.org/stable/c/55dfffc5e94730370b08de02c0cf3b7c951bbe9e https://git.kernel.org/stable/c/7296c938df2445f342be456a6ff0b3931d97f4e5 https://git.kernel.org/stable/c/c412185d557578d3f936537ed639c4ffaaed4075 https://git.kernel.org/stable/c/d8ab68bdb294b09a761e967dad374f2965e1913f