{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-38399",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-38399"
  ],
  "published": "2025-07-25T12:55:41Z",
  "summary": "scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()\n\nThe function core_scsi3_decode_spec_i_port(), in its error code path,\nunconditionally calls core_scsi3_lunacl_undepend_item() passing the\ndest_se_deve pointer, which may be NULL.\n\nThis can lead to a NULL pointer dereference if dest_se_deve remains\nunset.\n\nSPC-3 PR SPEC_I_PT: Unable to locate dest_tpg\nUnable to handle kernel paging request at virtual address dfff800000000012\nCall trace:\n  core_scsi3_lunacl_undepend_item+0x2c/0xf0 [target_core_mod] (P)\n  core_scsi3_decode_spec_i_port+0x120c/0x1c30 [target_core_mod]\n  core_scsi3_emulate_pro_register+0x6b8/0xcd8 [target_core_mod]\n  target_scsi3_emulate_pr_out+0x56c/0x840 [target_core_mod]\n\nFix this by adding a NULL check before calling\ncore_scsi3_lunacl_undepend_item()",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.144",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-38399"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/70ddb8133fdb512d4b1f2b4fd1c9e518514f182c"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1129e0e0a833acf90429e0f13951068d5f026e4f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1627dda4d70ceb1ba62af2e401af73c09abb1eb5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/55dfffc5e94730370b08de02c0cf3b7c951bbe9e"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7296c938df2445f342be456a6ff0b3931d97f4e5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/c412185d557578d3f936537ed639c4ffaaed4075"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d8ab68bdb294b09a761e967dad374f2965e1913f"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.5,
      "cvss_v3_severity": "High",
      "scenario": "AV:N - The vulnerable code is in the fabric-independent LIO SCSI target core, reached by parsing a PERSISTENT RESERVE OUT CDB and parameter list sent by a remote initiator; the flagship fabric (iscsi_target) accepts these over TCP/3260, so a remote peer on the network can deliver the malicious payload.\nAC:L - The attacker fully controls every precondition (service action, res_key=0, sa_res_key!=0, SPEC_I_PT bit, and the parameter list length/TransportID contents), and the NULL pointer is unconditionally present on the very first list entry, so a single malformed PR OUT command crashes the kernel deterministically with no race or memory-layout dependency.\nPR:N - LIO iSCSI targets are routinely deployed without CHAP, where the only \"credential\" is a self-asserted InitiatorName that is discoverable via a SendTargets discovery session, and demo-mode (generate_node_acls=1) grants any peer a mapped LUN outright \u2014 so an unauthenticated network attacker can establish the nexus needed to issue the command.\nUI:N - The crash is triggered purely by the attacker sending one SCSI command over an established I_T nexus; no action by any local user or administrator is needed.\nS:U - The NULL dereference occurs in the kernel that owns the target device and its impact is confined to that same kernel's security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:N - The fault is a read of a fixed small offset (se_deve->se_lun_acl) off a NULL pointer; no attacker-influenced offset, no out-of-bounds read, and no data is returned to the initiator, so nothing is disclosed.\nI:N - No memory is written and no attacker-controlled data reaches a store; the dereference faults on a read before any state modification, giving no write or control-flow primitive.\nA:H - The NULL pointer dereference produces a kernel oops (full panic with panic_on_oops) that can be re-triggered at will by an unauthenticated initiator, and the killed command context strands se_lun->lun_ref percpu references so the target subsystem hangs on teardown."
    }
  }
}
