]> xenbits.xensource.com Git - qemu-upstream-4.4-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:29:28 +0000 (14:29 +0000)
commit50590fb0c104ac3ed7dc1817994ae1e11dcc6a3c
tree01011ef42a578e0111cd0f0b500bcfc6df52c75c
parent32c5e5e70be80417ca21aa6e632a81f899ceead1
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/block/fdc.c