]> xenbits.xensource.com Git - qemu-upstream-4.5-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:25:32 +0000 (11:25 +0000)
commitc6dc376c4b5292769582137867d1be6c3960b5c7
tree14a1215b9b771ac9430fbcf30b6fdce2a85b7553
parentf74d682ee4878af6a8e943f5f0b595af92b20084
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