]> xenbits.xensource.com Git - qemu-xen-4.5-testing.git/commit
fdc: force the fifo access to be in bounds of the allocated buffer xen-4.5.1-rc2
authorPetr Matousek <pmatouse@redhat.com>
Wed, 6 May 2015 07:48:59 +0000 (09:48 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 27 May 2015 15:49:55 +0000 (16:49 +0100)
commite42b84cf1c524d017208b981c7749dc5945dda72
tree58e722d3723e79555df011f5bae54eb1ed648557
parent62e41581f69c3fd4a8f829a773015eb4c17f1f3e
fdc: force the fifo access to be in bounds of the allocated buffer

During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
get out of bounds leading to memory corruption with values coming
from the guest.

Fix this by making sure that the index is always bounded by the
allocated memory.

This is XSA-133 / CVE-2015-3456.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 4de1422ea306832b6ef2cba34e9febb73dd139a7)
hw/fdc.c