scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()
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()
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.240, 5.15.187, 6.1.144, 6.12.37, 6.15.6, 6.6.97
- CVEs
- CVE-2025-38399
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 07:46 UTC · Revision 1
Source evidence
scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()
core-osv · Original sourcePublished 25 Jul 2025, 12:53 UTC
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()
osv:CVE-2025-38399
Kernel
Fixed versions: 5.10.240, 5.15.187, 6.1.144, 6.6.97, 6.12.37, 6.15.6
Complete source record
{
"id": "e0dce6e23e68a771a784dba7d4d5a7776366eb72b8f1b139e6e91f3992060405",
"url": "https://osv.dev/vulnerability/CVE-2025-38399",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()",
"summary": "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()",
"evidence": "osv:CVE-2025-38399",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.240",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.187",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.144",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.97",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.37",
"evidence": "/affected/1/ranges"
},
{
"value": "6.15.6",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-38399",
"aliases": [
"CVE-2025-38399"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039"
},
{
"fixed": "70ddb8133fdb512d4b1f2b4fd1c9e518514f182c"
},
{
"fixed": "1129e0e0a833acf90429e0f13951068d5f026e4f"
},
{
"fixed": "1627dda4d70ceb1ba62af2e401af73c09abb1eb5"
},
{
"fixed": "55dfffc5e94730370b08de02c0cf3b7c951bbe9e"
},
{
"fixed": "7296c938df2445f342be456a6ff0b3931d97f4e5"
},
{
"fixed": "c412185d557578d3f936537ed639c4ffaaed4075"
},
{
"fixed": "d8ab68bdb294b09a761e967dad374f2965e1913f"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38399.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.9.0"
},
{
"fixed": "5.10.240"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.187"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.144"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.97"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.37"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.15.6"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38399.json"
}
}
],
"modified": "2026-10-28T02:30:50.392109497Z",
"provider": "osv",
"references": [
"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/70ddb8133fdb512d4b1f2b4fd1c9e518514f182c",
"https://git.kernel.org/stable/c/7296c938df2445f342be456a6ff0b3931d97f4e5",
"https://git.kernel.org/stable/c/c412185d557578d3f936537ed639c4ffaaed4075",
"https://git.kernel.org/stable/c/d8ab68bdb294b09a761e967dad374f2965e1913f",
"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html",
"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38399.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-38399",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38399.json"
}
},
"related_cves": [
{
"value": "CVE-2025-38399",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 518672,
"published_at": "2025-07-25T12:53:43.211+00:00"
}