]> git.proxmox.com Git - mirror_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)
committerJohn Snow <jsnow@redhat.com>
Tue, 12 May 2015 22:52:57 +0000 (18:52 -0400)
commite907746266721f305d67bc0718795fedee2e824c
tree5edfc55d07eb0db82922d1a512336e70f2bc1098
parent968bb75c348a401b85e08d5eb1887a3e6c3185f5
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>
hw/block/fdc.c