RDMA/srp: bound SRP_RSP sense copy by the received length
- 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.259, 5.15.210, 6.1.176, 6.6.143, 6.12.94, 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: partial
Summary
In the Linux kernel, the following vulnerability has been resolved: RDMA/srp: bound SRP_RSP sense copy by the received length srp_process_rsp() copies sense data from rsp->data + resp_data_len, where resp_data_len is the full 32-bit value supplied by the SRP target and is never checked against the number of bytes actually received (wc->byte_len). The copy length is bounded to SCSI_SENSE_BUFFERSIZE, so at most 96 bytes are copied, but the source offset is not bounded. A malicious or compromised SRP target on the InfiniBand/RoCE fabric that the initiator has logged into can return an SRP_RSP with SRP_RSP_FLAG_SNSVALID set and a large resp_data_len. The receive buffer is allocated at the target-chosen max_ti_iu_len, so the source of the sense copy lands past the bytes actually received; with resp_data_len near 0xFFFFFFFF it is gigabytes past the buffer and the read faults. Copy the sense data only if it has not been truncated, that is, only if the response header, the response data, and the sense region fit within the bytes actually received; otherwise drop the sense and log. The in-tree iSER and NVMe-RDMA receive paths already bound their parse by wc->byte_len; this brings ib_srp into line with them.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- Linux Linux
From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 3889517c2ec7f364914aea8209abfff735f7ecde; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in ed77cc819ad631264787cade5ae5ec4c535ec6bb; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 0b9ee09d5e849591f17d98c078033dadea967293; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 0d64bc200ebe4f275b27438c6e593903e0b16fe1; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 2015038195939eac54a1ee83c9d98ef1a8ccbbce; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in f92a285db7ff6e598591ccbfb551be155c5f4d57; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 3523e53ff95f1837ec3f57ff7558532bcb2661b7; From aef9ec39c47f0cece886ddd6b53c440321e0b2a6 · fixed in 13e91fd076306f5d0cdfa14f53d69e37274723c4
- Linux Linux
2.6.15
- KernelLinux
From 2.6.15 · fixed in 5.10.259; From 5.11.0 · fixed in 5.15.210; From 5.16.0 · fixed in 6.1.176; From 6.2.0 · fixed in 6.6.143; From 6.7.0 · fixed in 6.12.94; From 6.13.0 · fixed in 6.18.36; From 6.19.0 · fixed in 7.0.13
References 8
git.kernel.org
- stable/c/3889517c2ec7f364914aea8209abfff735f7ecde
- stable/c/ed77cc819ad631264787cade5ae5ec4c535ec6bb
- stable/c/0b9ee09d5e849591f17d98c078033dadea967293
- stable/c/0d64bc200ebe4f275b27438c6e593903e0b16fe1
- stable/c/2015038195939eac54a1ee83c9d98ef1a8ccbbce
- stable/c/f92a285db7ff6e598591ccbfb551be155c5f4d57
- stable/c/3523e53ff95f1837ec3f57ff7558532bcb2661b7
- stable/c/13e91fd076306f5d0cdfa14f53d69e37274723c4