]> xenbits.xensource.com Git - qemu-upstream-4.3-testing.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)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 8 Sep 2015 11:26:00 +0000 (11:26 +0000)
commit92dae02ba02166cfcce020cb71021a73903ada2f
treee414a3f9149dd2769bd57298e4822772332606d2
parent20c1b1812de98ed789d55e22a43a4700fb765596
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>
ui/vnc.c