scsi: libiscsi: Fix stale-data leak into the SCSI sense 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: partial
Summary
In the Linux kernel, the following vulnerability has been resolved: scsi: libiscsi: Fix stale-data leak into the SCSI sense buffer iscsi_scsi_cmd_rsp() copies the sense data of a SCSI Response from the target-supplied data segment. The segment carries a 2-byte sense length followed by the sense bytes, so it must hold 2 + senselen bytes, but the bounds check only requires datalen >= senselen: senselen = get_unaligned_be16(data); if (datalen < senselen) goto invalid_datalen; memcpy(sc->sense_buffer, data + 2, min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); A target that returns a SCSI Response whose datalen equals senselen (with senselen <= SCSI_SENSE_BUFFERSIZE) makes the memcpy() from data + 2 read up to two bytes past the received data. Those bytes are stale conn->data contents and end up in the command's sense buffer, which is returned to userspace. Account for the 2-byte sense length prefix in the check.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- Linux Linux
From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 812f1ae95b22419422972748f173b0916ee4d621; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in fef6167e8149896cd81bea333fd51b1c91239149; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in baa04572673125e4d5bc309b4077d1cb46cc78d1; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 7567f06abdefb1caf2d836107c4d08c5185c650e; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 60499924faf4ef97e84228c20515218ef121facf; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 3ef209ca0b4b68c75e9a814d90cc916026b5a6ac; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 1f07a897d43c63e6c9458bf77450defef39b5833; From 7996a778ff8c717cb1a7a294475c59cc8f1e9fb8 · fixed in 98b87885de4b7f605533a2860685f5689fce8e82
- Linux Linux
2.6.18
- KernelLinux
From 2.6.18 · 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/812f1ae95b22419422972748f173b0916ee4d621
- stable/c/fef6167e8149896cd81bea333fd51b1c91239149
- stable/c/baa04572673125e4d5bc309b4077d1cb46cc78d1
- stable/c/7567f06abdefb1caf2d836107c4d08c5185c650e
- stable/c/60499924faf4ef97e84228c20515218ef121facf
- stable/c/3ef209ca0b4b68c75e9a814d90cc916026b5a6ac
- stable/c/1f07a897d43c63e6c9458bf77450defef39b5833
- stable/c/98b87885de4b7f605533a2860685f5689fce8e82