# CVE-2025-38399: scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Published: 2025-07-25T12:53:43.211Z
- Modified: 2026-10-15T22:18:39.923Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: Linux

## 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()

(As written by CVE List.)

## Affected

- Linux Linux: from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before 1129e0e0a833acf90429e0f13951068d5f026e4f; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before 1627dda4d70ceb1ba62af2e401af73c09abb1eb5; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before 55dfffc5e94730370b08de02c0cf3b7c951bbe9e; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before 7296c938df2445f342be456a6ff0b3931d97f4e5; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before c412185d557578d3f936537ed639c4ffaaed4075; from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 before d8ab68bdb294b09a761e967dad374f2965e1913f; 5.9 (not affected: before 5.9; from 5.10.240 up to 5.10.*; from 5.15.187 up to 5.15.*; from 6.1.144 up to 6.1.*; from 6.6.97 up to 6.6.*; from 6.12.37 up to 6.12.*; from 6.15.6 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 5.9 before 5.10.240; from 5.11 before 5.15.187; from 5.16 before 6.1.144; from 6.2 before 6.6.97; from 6.7 before 6.12.37; from 6.13 before 6.15.6; 6.16
- debian debian_linux: 11.0

## Every score

- Linux: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/70ddb8133fdb512d4b1f2b4fd1c9e518514f182c> (patch)
- <https://git.kernel.org/stable/c/1129e0e0a833acf90429e0f13951068d5f026e4f> (patch)
- <https://git.kernel.org/stable/c/1627dda4d70ceb1ba62af2e401af73c09abb1eb5> (patch)
- <https://git.kernel.org/stable/c/55dfffc5e94730370b08de02c0cf3b7c951bbe9e> (patch)
- <https://git.kernel.org/stable/c/7296c938df2445f342be456a6ff0b3931d97f4e5> (patch)
- <https://git.kernel.org/stable/c/c412185d557578d3f936537ed639c4ffaaed4075> (patch)
- <https://git.kernel.org/stable/c/d8ab68bdb294b09a761e967dad374f2965e1913f> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)

## Sources

- CVE List: [CVE-2025-38399](https://www.cve.org/CVERecord?id=CVE-2025-38399), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2025-38399](https://nvd.nist.gov/vuln/detail/CVE-2025-38399), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2025-38399 · Whole record: https://cve.day/CVE-2025-38399.json · Rebuilt by cve.day 2026-11-25T22:59:01.690Z
