qemu-e2k/hw/ide
Paolo Bonzini 8132122889 ide: atapi: assert that the buffer pointer is in range
A case was reported where s->io_buffer_index can be out of range.
The report skimped on the details but it seems to be triggered
by s->lba == -1 on the READ/READ CD paths (e.g. by sending an
ATAPI command with LBA = 0xFFFFFFFF).  For now paper over it
with assertions.  The first one ensures that there is no overflow
when incrementing s->io_buffer_index, the second checks for the
buffer overrun.

Note that the buffer overrun is only a read, so I am not sure
if the assertion failure is actually less harmful than the overrun.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20201201120926.56559-1-pbonzini@redhat.com
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-12-01 15:23:05 +00:00
..
ahci_internal.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ahci-allwinner.c ahci: Move QOM macro to header 2020-08-27 14:04:54 -04:00
ahci.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
atapi.c ide: atapi: assert that the buffer pointer is in range 2020-12-01 15:23:05 +00:00
cmd646.c
core.c ide: clear SRST after SRST finishes 2020-10-27 10:39:06 -04:00
ich.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ioport.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
isa.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
Kconfig
macio.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
meson.build meson: convert hw/ide 2020-08-21 06:30:30 -04:00
microdrive.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mmio.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
pci.c ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
piix.c xen: rework pci_piix3_xen_ide_unplug 2020-11-02 11:56:55 +00:00
qdev.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
sii3112.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events ide: rename cmd_write to ctrl_write 2020-10-01 13:04:16 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
via.c