scsi: libiscsi_tcp: Bound SCSI Response data segment to the connection buffer
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.265, 5.15.216, 6.1.183, 6.6.151, 6.12.103, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: scsi: libiscsi_tcp: Bound SCSI Response data segment to the connection buffer iscsi_tcp_hdr_dissect() receives the data segment of several PDU types into the fixed-size conn->data buffer, which is allocated for ISCSI_DEF_MAX_RECV_SEG_LEN (8192) bytes. For the LOGIN_RSP, TEXT_RSP, REJECT and ASYNC_EVENT opcodes the dissect path already rejects a PDU whose DataSegmentLength exceeds that buffer. The SCSI Command Response (ISCSI_OP_SCSI_CMD_RSP) path also copies its data segment (sense/response data) into conn->data via iscsi_tcp_data_recv_prep(), but it does so without the same check. The only upstream bound on in.datalen is conn->max_recv_dlength, the initiator's advertised MaxRecvDataSegmentLength, which is commonly negotiated well above 8192 (open-iscsi defaults to 262144). A target that returns a SCSI Response with a DataSegmentLength between 8193 and max_recv_dlength therefore overflows the 8192-byte conn->data buffer. Once the same bound applies, ISCSI_OP_SCSI_CMD_RSP is handled exactly like those responses: bound the data segment, receive it into conn->data when present, and otherwise complete the PDU with no data. Fold the opcode into that case group rather than duplicating the check.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in a51812842084fd390590ab8dc0431f10c73ddc56; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in a8f94cc9f0e5759252551be3a172960c57f21f54; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in f1a3a51fc5dba0e99532379665069f1700da6b44; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in c97b5265cc47775f77fd2a23d6bde0426997b233; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in 084af0253673425ce2ae62e3c7f74f0dd023711b; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in 72815741715bd41556dac5eeb068bf0f8af06ee7; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in b0aa3e8e2ab4ca92adb28a3ef41873b3363b8676; From a081c13e39b5c17052a7b46fafa61019c4c110ff · fixed in c1dea15f819cded9b3faf58f8bec72323568b6e6
- Linux Linux
2.6.29
- KernelLinux
From 2.6.29 · fixed in 5.10.265; From 5.11.0 · fixed in 5.15.216; From 5.16.0 · fixed in 6.1.183; From 6.2.0 · fixed in 6.6.151; From 6.7.0 · fixed in 6.12.103; From 6.13.0 · fixed in 6.18.44; From 6.19.0 · fixed in 7.1.8
References 8
git.kernel.org
- stable/c/a51812842084fd390590ab8dc0431f10c73ddc56
- stable/c/a8f94cc9f0e5759252551be3a172960c57f21f54
- stable/c/f1a3a51fc5dba0e99532379665069f1700da6b44
- stable/c/c97b5265cc47775f77fd2a23d6bde0426997b233
- stable/c/084af0253673425ce2ae62e3c7f74f0dd023711b
- stable/c/72815741715bd41556dac5eeb068bf0f8af06ee7
- stable/c/b0aa3e8e2ab4ca92adb28a3ef41873b3363b8676
- stable/c/c1dea15f819cded9b3faf58f8bec72323568b6e6