An off-by-one error was found in the SCSI Device emulation in QEMU. It could occur in hw/scsi/scsi-disk.c:modesensepage() while processing MODE SELECT commands if 'page' was set to MODEPAGEALLS (0x3f). Specifically, 'page' was used to index the stack-allocated 'modesensevalid' buffer (size=0x3f), causing an off-by-one error when trying to access the last element. A malicious guest could use this flaw to potentially crash QEMU, resulting in a denial of service condition.