]> git.ipfire.org Git - thirdparty/qemu.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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 28 Jul 2015 23:26:06 +0000 (18:26 -0500)
commit959fad0ff11837d299e22b0f148c608b50eec457
tree12fc7b3334eef4051cc5989cc1e567a86604410d
parenta4bb522ee51087af61998f290d12ba2e14c7910e
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>
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit e907746266721f305d67bc0718795fedee2e824c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/block/fdc.c