]> xenbits.xensource.com Git - qemu-xen-unstable.git/commit
ui/vnc: limit client_cut_text msg payload size
authorPeter Lieven <pl@kamp.de>
Mon, 30 Jun 2014 08:07:54 +0000 (10:07 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Sep 2015 14:07:06 +0000 (15:07 +0100)
commit2b5684137e81251c37e349525e869e6a076f9574
treefc13f61e87050153b95f0a24e25937559ee74bdf
parent5cdde31eacdd288359746019ad05cac8ed5d9f70
ui/vnc: limit client_cut_text msg payload size

currently a malicious client could define a payload
size of 2^32 - 1 bytes and send up to that size of
data to the vnc server. The server would allocated
that amount of memory which could easily create an
out of memory condition.

This patch limits the payload size to 1MB max.

Please note that client_cut_text messages are currently
silently ignored.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit f9a70e79391f6d7c2a912d785239ee8effc1922d)
Conflicts:
ui/vnc.c

Dropped { } style changes.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
vnc.c