6d1511cea0
In scsi_req_parse_cdb(), if the CDB length implied by the command type exceeds the initialized portion of the command buffer, reject the request. Rejected requests are recorded by the `scsi_req_parse_bad` trace event. On example of a bug detected by this check is SunOS's use of interleaved DMA and non-DMA commands. This guest behavior currently causes QEMU to parse uninitialized memory as a SCSI command, with unpredictable outcomes. With the new check in place: * QEMU consistently creates a trace event and rejects the request. * SunOS retries the request(s) and is able to successfully boot from disk. Signed-off-by: John Millikin <john@john-millikin.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1127 Message-Id: <20220817053458.698416-2-john@john-millikin.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
emulation.c | ||
esp-pci.c | ||
esp.c | ||
Kconfig | ||
lsi53c895a.c | ||
megasas.c | ||
meson.build | ||
mfi.h | ||
mpi.h | ||
mptconfig.c | ||
mptendian.c | ||
mptsas.c | ||
mptsas.h | ||
scsi-bus.c | ||
scsi-disk.c | ||
scsi-generic.c | ||
spapr_vscsi.c | ||
srp.h | ||
trace-events | ||
trace.h | ||
vhost-scsi-common.c | ||
vhost-scsi.c | ||
vhost-user-scsi.c | ||
viosrp.h | ||
virtio-scsi-dataplane.c | ||
virtio-scsi.c | ||
vmw_pvscsi.c | ||
vmw_pvscsi.h |