# CVE-2025-38399: scsi: target: Fix NULL pointer dereference in core\_scsi3\_decode\_spec\_i\_port()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.79% (percentile 53, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2025-07-25T12:53:43.211Z
- **Modified:** 2026-10-15T22:18:39.923Z

## Who should check

- Anyone running Linux \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1129e0e0a833acf90429e0f13951068d5f026e4f; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1627dda4d70ceb1ba62af2e401af73c09abb1eb5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 55dfffc5e94730370b08de02c0cf3b7c951bbe9e; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 7296c938df2445f342be456a6ff0b3931d97f4e5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< c412185d557578d3f936537ed639c4ffaaed4075; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< d8ab68bdb294b09a761e967dad374f2965e1913f
- Anyone running Linux 5.9

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

## Affected and fixed versions

- Linux: \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1129e0e0a833acf90429e0f13951068d5f026e4f; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1627dda4d70ceb1ba62af2e401af73c09abb1eb5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 55dfffc5e94730370b08de02c0cf3b7c951bbe9e; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 7296c938df2445f342be456a6ff0b3931d97f4e5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< c412185d557578d3f936537ed639c4ffaaed4075; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< d8ab68bdb294b09a761e967dad374f2965e1913f (cvelist)
- Linux: 5.9 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38399. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38399.md
Affected: Linux >= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, < 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c; >= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, < 1129e0e0a833acf90429e0f13951068d5f026e4f; >= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, < 1627dda4d70ceb1ba62af2e401af73c09abb1eb5; >= f32ba612ef0f8eecaf6d2a5…
Fixed in: Linux 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c, Linux 1129e0e0a833acf90429e0f13951068d5f026e4f, Linux 1627dda4d70ceb1ba62af2e401af73c09abb1eb5, Linux 55dfffc5e94730370b08de02c0cf3b7c951bbe9e, Linux 7296c938df2445f342be456a6ff0b3931d97f4e5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38399 being exploited?

There is no confirmed exploitation: CVE-2025-38399 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.79% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-38399?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-38399?

Linux \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1129e0e0a833acf90429e0f13951068d5f026e4f; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 1627dda4d70ceb1ba62af2e401af73c09abb1eb5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 55dfffc5e94730370b08de02c0cf3b7c951bbe9e; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< 7296c938df2445f342be456a6ff0b3931d97f4e5; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< c412185d557578d3f936537ed639c4ffaaed4075; \>= f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, \< d8ab68bdb294b09a761e967dad374f2965e1913f; Linux 5.9.

### Is there a fix for CVE-2025-38399?

Yes. Fixed in Linux 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c, Linux 1129e0e0a833acf90429e0f13951068d5f026e4f, Linux 1627dda4d70ceb1ba62af2e401af73c09abb1eb5, Linux 55dfffc5e94730370b08de02c0cf3b7c951bbe9e, Linux 7296c938df2445f342be456a6ff0b3931d97f4e5. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38399?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38399>

HTML: <https://flawdb.com/CVE-2025-38399> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38399>
