input: limit kbd queue depth
commitfa18f36a461984eae50ab957e47ec78dae3c14fc
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 28 Apr 2017 08:42:37 +0000 (28 10:42 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 3 May 2017 12:18:21 +0000 (3 14:18 +0200)
tree50707e34aab0606335a94762dfc4a333d078479f
parente619b14746e5d8c0e53061661fd0e1da01fd4d60
input: limit kbd queue depth

Apply a limit to the number of items we accept into the keyboard queue.

Impact: Without this limit vnc clients can exhaust host memory by
sending keyboard events faster than qemu feeds them to the guest.

Fixes: CVE-2017-8379
Cc: P J P <ppandit@redhat.com>
Cc: Huawei PSIRT <PSIRT@huawei.com>
Reported-by: jiangxin1@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20170428084237.23960-1-kraxel@redhat.com
ui/input.c