While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was transferring more than 16 bytes. Increase the command buffer size to 32, which is maximum when 's->do_cmd' is set, and add a check on 'len' to avoid OOB access. Reported-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
|---|---|---|
| .. | ||
| Makefile.objs | ||
| esp-pci.c | ||
| esp.c | ||
| lsi53c895a.c | ||
| megasas.c | ||
| 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 | ||
| vhost-scsi.c | ||
| viosrp.h | ||
| virtio-scsi-dataplane.c | ||
| virtio-scsi.c | ||
| vmw_pvscsi.c | ||
| vmw_pvscsi.h | ||