]> xenbits.xensource.com Git - qemu-upstream-4.4-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:54 +0000 (11:25 +0000)
commit181e2e0ff39cbfeab173fa6d6b31839f00efcd06
treee3468c28948d70e393c001db4f43366a07d66a1a
parent0fc147387f0b683d2dfefec7b1af569f17b72e9c
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