CVE-2021-47290
published high CVSS 3.1 · 7.5scsi: target: Fix NULL dereference on XCOPY completion
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux39ae3edda325e9cf9e978c9788affe88231f3b34 to < e7732c5a19a15a62b0b23fd683a639b0483e1f40 · 39ae3edda325e9cf9e978c9788affe88231f3b34 to < a47fa41381a09e5997afd762664db4f5f6657e03 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.13 (affected) · 0 to < 5.13 (unaffected · semver) · 5.13.6 through 5.13.* (unaffected · semver) · 5.14 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix NULL dereference on XCOPY completion CPU affinity control added with commit 39ae3edda325 ("scsi: target: core: Make completion affinity configurable") makes target_complete_cmd() queue work on a CPU based on se_tpg->se_tpg_wwn->cmd_compl_affinity state. LIO's EXTENDED COPY worker is a special case in that read/write cmds are dispatched using the global xcopy_pt_tpg, which carries a NULL se_tpg_wwn pointer following initialization in target_xcopy_setup_pt(). The NULL xcopy_pt_tpg->se_tpg_wwn pointer is dereferenced on completion of any EXTENDED COPY initiated read/write cmds. E.g using the libiscsi SCSI.ExtendedCopy.Simple test: BUG: kernel NULL pointer dereference, address: 00000000000001a8 RIP: 0010:target_complete_cmd+0x9d/0x130 [target_core_mod] Call Trace: fd_execute_rw+0x148/0x42a [target_core_file] ? __dynamic_pr_debug+0xa7/0xe0 ? target_check_reservation+0x5b/0x940 [target_core_mod] __target_execute_cmd+0x1e/0x90 [target_core_mod] transport_generic_new_cmd+0x17c/0x330 [target_core_mod] target_xcopy_issue_pt_cmd+0x9/0x60 [target_core_mod] target_xcopy_read_source.isra.7+0x10b/0x1b0 [target_core_mod] ? target_check_fua+0x40/0x40 [target_core_mod] ? transport_complete_task_attr+0x130/0x130 [target_core_mod] target_xcopy_do_work+0x61f/0xc00 [target_core_mod] This fix makes target_complete_cmd() queue work on se_cmd->cpuid if se_tpg_wwn is NULL.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Scenarios
- en: AV:N - A remote SCSI initiator can trigger the bug over network fabrics such as LIO iSCSI/iSER by sending EXTENDED_COPY, which builds passthrough READ/WRITE cmds that complete through target_complete_cmd(). AC:L - Any successful EXTENDED_COPY that performs read/write I/O hits the NULL se_tpg_wwn dereference on completion; emulate_3pc is enabled by default and no race or external timing is required. PR:N - Although CHAP can be enforced, a reasonable exposed LIO target may disable authentication or use open initiator ACLs, so an unauthenticated remote initiator with LUN access is a plausible highest-severity scenario. UI:N - No victim user action is required after the target is exported; the attacker sends the SCSI EXTENDED_COPY command directly. S:U - Impact remains within the host kernel SCSI target security authority; this is a DoS of the target host itself, not a guest-to-host or other scope-crossing escape. C:N - The defect is a pure NULL pointer dereference of se_tpg_wwn when selecting completion CPU affinity and does not leak kernel or storage data. I:N - The NULL dereference performs no write or control-flow hijack beyond the crash; there is no memory corruption primitive. A:H - The NULL dereference produces a kernel oops/BUG as shown in the fix commit, which can crash or destabilize the target host.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 39ae3edda325e9cf9e978c9788affe88231f3b34 to < e7732c5a19a15a62b0b23fd683a639b0483e1f40 (affected · git)39ae3edda325e9cf9e978c9788affe88231f3b34 to < a47fa41381a09e5997afd762664db4f5f6657e03 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.13 (affected)0 to < 5.13 (unaffected · semver)5.13.6 through 5.13.* (unaffected · semver)5.14 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
3Linux · cna
scsi: target: Fix NULL dereference on XCOPY completion
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2cb0b5e14aa063da23552b0ea500785cfb452ee789c616ab7aa0e7ca53f117ae
- Ingested
- 23 Sep 2026, 07:57:11 UTC
- Source record
- Official CVE record