CVE-2025-38399

scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()

7.5 high EPSS 0.52%

Published 25 Jul 2025 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2025-38399

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38399 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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

Severity (CVSS)

7.5 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.52%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 45.5% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 15 Oct 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
yes: an attacker can automate the attack across many targets
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before 70ddb8133fdb512d4b1f2b4fd1c9e518514f182c
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before 1129e0e0a833acf90429e0f13951068d5f026e4f
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before 1627dda4d70ceb1ba62af2e401af73c09abb1eb5
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before 55dfffc5e94730370b08de02c0cf3b7c951bbe9e
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before 7296c938df2445f342be456a6ff0b3931d97f4e5
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before c412185d557578d3f936537ed639c4ffaaed4075
affected from f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039, before d8ab68bdb294b09a761e967dad374f2965e1913f
Other versions: unaffected
Linux
affected 5.9
unaffected before 5.9
unaffected from 5.10.240 up to and including 5.10.*
unaffected from 5.15.187 up to and including 5.15.*
unaffected from 6.1.144 up to and including 6.1.*
unaffected from 6.6.97 up to and including 6.6.*
unaffected from 6.12.37 up to and including 6.12.*
unaffected from 6.15.6 up to and including 6.15.*
unaffected 6.16 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38399 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38399

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-38399
trivy image --scanners vuln IMAGE | grep CVE-2025-38399

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-38399 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.