]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
hw/misc/arm_sysctl: Fix bad boundary check on mb clock accesses
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 26 Feb 2014 17:19:57 +0000 (17:19 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 26 Feb 2014 17:19:57 +0000 (17:19 +0000)
commitec1efab95767312ff4afb816d0d4b548e093b031
tree1e9223fb627f164f7be8badbb33e3559c6330b1e
parentd5001cf787ad0514839a81d0f2e771e01e076e21
hw/misc/arm_sysctl: Fix bad boundary check on mb clock accesses

Fix incorrect use of sizeof() rather than ARRAY_SIZE() to guard
accesses into the mb_clock[] array, which was allowing a malicious
guest to overwrite the end of the array.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-id: 1392647854-8067-2-git-send-email-peter.maydell@linaro.org
Cc: qemu-stable@nongnu.org
hw/misc/arm_sysctl.c