]> git.proxmox.com Git - mirror_qemu.git/commit - hw/scsi/esp.c
esp: don't overflow cmdfifo if TC is larger than the cmdfifo size
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 7 Apr 2021 19:57:58 +0000 (20:57 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 12 Apr 2021 21:35:53 +0000 (22:35 +0100)
commit0ebb5fd80589835153a0c2baa1b8cc7a04e67a93
tree3aa508aa2e1a85588b25a5e81291ab4e6beaead2
parentfbc6510e3379fa8f8370bf71198f0ce733bf07f9
esp: don't overflow cmdfifo if TC is larger than the cmdfifo size

If a guest transfers the message out/command phase data using DMA with a TC
that is larger than the cmdfifo size then the cmdfifo overflows triggering
an assert. Limit the size of the transfer to the free space available in
cmdfifo.

Buglink: https://bugs.launchpad.net/qemu/+bug/1919036
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20210407195801.685-10-mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c