Files
xserver/dix
Peter Hutterer 219c54b8a3 dix: fix DeviceStateNotify event calculation
The previous code only made sense if one considers buttons and keys to
be mutually exclusive on a device. That is not necessarily true, causing
a number of issues.

This function allocates and fills in the number of xEvents we need to
send the device state down the wire.  This is split across multiple
32-byte devices including one deviceStateNotify event and optional
deviceKeyStateNotify, deviceButtonStateNotify and (possibly multiple)
deviceValuator events.

The previous behavior would instead compose a sequence
of [state, buttonstate, state, keystate, valuator...]. This is not
protocol correct, and on top of that made the code extremely convoluted.

Fix this by streamlining: add both button and key into the deviceStateNotify
and then append the key state and button state, followed by the
valuators. Finally, the deviceValuator events contain up to 6 valuators
per event but we only ever sent through 3 at a time. Let's double that
troughput.

CVE-2024-0229, ZDI-CAN-22678

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
2024-01-16 09:24:01 +01:00
..
2020-07-05 13:07:33 -07:00
2015-07-08 16:41:29 -04:00
2003-11-14 16:49:22 +00:00
2003-11-14 15:54:54 +00:00
2020-07-05 13:07:33 -07:00
2014-11-12 10:25:00 +10:00
2017-10-30 13:45:20 -04:00
2019-10-30 16:17:04 +00:00
2015-04-21 16:57:07 -07: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