]> git.ipfire.org Git - thirdparty/qemu.git/commit
vnc: sanitize bits_per_pixel from the client
authorPetr Matousek <pmatouse@redhat.com>
Mon, 27 Oct 2014 11:41:44 +0000 (12:41 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 7 Jan 2015 00:26:44 +0000 (18:26 -0600)
commitb2f1d90530301d7915dddc8a750063757675b21a
tree4ca8039649603dc17249387227fd37279c9c1ceb
parent5a6af9724369b321f0ae4459403ef76e4a7bd507
vnc: sanitize bits_per_pixel from the client

bits_per_pixel that are less than 8 could result in accessing
non-initialized buffers later in the code due to the expectation
that bytes_per_pixel value that is used to initialize these buffers is
never zero.

To fix this check that bits_per_pixel from the client is one of the
values that the rfb protocol specification allows.

This is CVE-2014-7815.

Signed-off-by: Petr Matousek <pmatouse@redhat.com>
[ kraxel: apply codestyle fix ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit e6908bfe8e07f2b452e78e677da1b45b1c0f6829)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
ui/vnc.c