Mauro Matteo Cascella d307040b18 ui/vnc-clipboard: fix integer underflow in vnc_client_cut_text_ext
Extended ClientCutText messages start with a 4-byte header. If len < 4,
an integer underflow occurs in vnc_client_cut_text_ext. The result is
used to decompress data in a while loop in inflate_buffer, leading to
CPU consumption and denial of service. Prevent this by checking dlen in
protocol_client_msg.

Fixes: CVE-2022-3165
Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support")
Reported-by: TangPeng <tangpeng@qianxin.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Message-Id: <20220925204511.1103214-1-mcascell@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-10-11 15:30:27 +02:00
..
2020-09-30 19:09:19 +02:00
2019-03-11 08:39:02 +01:00
2021-12-21 10:50:22 +04:00
2021-12-21 10:50:22 +04:00
2022-09-29 18:23:51 +02:00
2022-05-03 15:52:37 +04:00
2022-06-28 11:06:02 +02:00
2019-08-16 13:31:52 +02:00
2022-03-14 15:16:16 +04:00
2017-07-27 14:23:09 +02:00
2016-02-04 17:01:04 +00:00
2019-02-05 16:50:18 +01:00
2021-01-23 15:55:07 -05:00
2022-04-27 07:50:28 +02:00