CyberRota Analysis
AI-GeneratedThe vulnerability affects the Linux kernel's SCSI Block Service (bsg) implementation, specifically in the io_uring passthrough command setup, where a time-of-check to time-of-use (TOCTOU) issue allows userspace to modify a field after it has been validated. This can lead to a buffer overflow in the command structure, potentially allowing an attacker to execute arbitrary code or cause a denial of service. Organizations using affected Linux kernel versions, particularly those relying on SCSI devices and io_uring for high-performance I/O operations, should prioritize applying the relevant patches to mitigate this risk.
Original NVD Description
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.