Linux
scsi: bsg: Fix TOCTOU in io_uring passthrough command setup
In the Linux kernel, the following vulnerability has been resolved: scsi: bsg: Fix TOCTOU in io_uring passthrough command setup scsi_bsg_uring_cmd() reads bsg_uring_cmd from the shared mmap'd SQE. Userspace can change a field after we check it and before we use it. request_len is the sharp case: it can grow past sizeof(scmd->cmnd) after the bound check and overflow scmd->cmnd in copy_from_user(). READ_ONCE() the SQE fields we check or use into locals before use.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 7b6d3255e7f8c6df2d21504c47808e3ce84649ac, < f033530105aa73d82c121d54b57f358e4865d2f4
- >= 7b6d3255e7f8c6df2d21504c47808e3ce84649ac, < 4b3c5965fca99f62d31c963294bd5b23cc488e97
Fixed in f033530105aa73d82c121d54b57f358e4865d2f4, 4b3c5965fca99f62d31c963294bd5b23cc488e97
- 7.1
Fixed in 0, 7.2.5, 7.3
Mitigation
Upgrade Linux to f033530105aa73d82c121d54b57f358e4865d2f4 or 4b3c5965fca99f62d31c963294bd5b23cc488e97 or later.
Upgrade Linux to 0 or 7.2.5 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.