diff options
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r-- | hw/scsi-disk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 50fc3d6eaa..6b139acda1 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1180,6 +1180,9 @@ static int scsi_disk_emulate_command(SCSIDiskReq *r) if (!nb_sectors) { goto not_ready; } + if ((req->cmd.buf[8] & 1) == 0 && req->cmd.lba) { + goto illegal_request; + } nb_sectors /= s->cluster_size; /* Returned value is the address of the last sector. */ nb_sectors--; @@ -1232,6 +1235,9 @@ static int scsi_disk_emulate_command(SCSIDiskReq *r) if (!nb_sectors) { goto not_ready; } + if ((req->cmd.buf[14] & 1) == 0 && req->cmd.lba) { + goto illegal_request; + } nb_sectors /= s->cluster_size; /* Returned value is the address of the last sector. */ nb_sectors--; |