]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commit
fdc: force the fifo access to be in bounds of the allocated buffer
authorPetr Matousek <pmatouse@redhat.com>
Wed, 6 May 2015 07:48:59 +0000 (09:48 +0200)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 13 May 2015 14:32:43 +0000 (14:32 +0000)
commit35fc1ed1d479528c1601c1bc65628fb8ab6aae52
treef1f9f05e18b2c633e0cd3fb64933798ccfcc1aa9
parente49807b61c8152b0730a310a3d771ac253e750aa
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 CVE-2015-3456.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
hw/fdc.c