]> xenbits.xensource.com Git - qemu-upstream-4.2-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:05 +0000 (11:26 +0000)
commit2a5956801545ff4122dc9551bcc4c4e3053f30ba
treec2a8aa5ec33c94a9934738aabbd94116a9903c93
parent138906105dd47b9dc6b1e5010e81fc606983dd75
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