Files
xserver/dix
Peter Hutterer 8a1fa008b2 Xi: avoid integer truncation in length check of ProcXIChangeProperty
This fixes an OOB read and the resulting information disclosure.

Length calculation for the request was clipped to a 32-bit integer. With
the correct stuff->num_items value the expected request size was
truncated, passing the REQUEST_FIXED_SIZE check.

The server then proceeded with reading at least stuff->num_items bytes
(depending on stuff->format) from the request and stuffing whatever it
finds into the property. In the process it would also allocate at least
stuff->num_items bytes, i.e. 4GB.

The same bug exists in ProcChangeProperty and ProcXChangeDeviceProperty,
so let's fix that too.

CVE-2022-46344, ZDI-CAN 19405

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 8f454b793e)
2022-12-14 11:24:46 +10:00
..
2020-07-05 13:07:33 -07:00
2015-07-08 16:41:29 -04:00
2020-07-05 13:07:33 -07:00
2021-05-30 13:26:42 +03:00
2021-06-07 17:28:05 +02:00
2014-11-12 10:25:00 +10:00
2020-07-05 13:07:33 -07:00
2017-10-30 13:45:20 -04:00
2021-05-30 13:26:42 +03:00
2019-10-30 16:17:04 +00:00
2015-04-21 16:57:07 -07:00
2019-10-30 16:17:04 +00:00
2020-07-31 14:51:23 +00:00
2020-07-05 13:07:33 -07:00
2020-07-05 13:07:33 -07:00
2013-07-23 23:56:58 +01:00
2020-07-05 13:07:33 -07:00
2014-11-12 10:25:00 +10:00
2021-09-06 21:19:46 +00:00
2020-07-05 13:07:33 -07:00