Re: [PATCH] scsi: bsg: copy uring_cmd payload to prevent double-fetch from shared SQE
Bart Van Assche <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-scsi,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On 5/27/26 3:59 AM, Rahul Chandelkar wrote: > scsi_bsg_uring_cmd() and scsi_bsg_map_user_buffer() read bsg_uring_cmd > fields directly from the shared mmap'd io_uring submission ring via > io_uring_sqe128_cmd(). On the inline execution path, io_uring has not > yet copied the SQE to kernel memory, so a concurrent userspace thread > can modify fields between reads. Reviewed-by: Bart Van Assche <[email protected]>