mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-02 01:28:24 +02:00
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
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| atom.c | ||
| buildatoms | ||
| BuiltInAtoms | ||
| colormap.c | ||
| cursor.c | ||
| devices.c | ||
| dispatch.c | ||
| dispatch.h | ||
| dixfonts.c | ||
| dixutils.c | ||
| enterleave.c | ||
| enterleave.h | ||
| eventconvert.c | ||
| events.c | ||
| extension.c | ||
| gc.c | ||
| gestures.c | ||
| getevents.c | ||
| globals.c | ||
| glyphcurs.c | ||
| grabs.c | ||
| initatoms.c | ||
| inpututils.c | ||
| main.c | ||
| Makefile.am | ||
| meson.build | ||
| pixmap.c | ||
| privates.c | ||
| property.c | ||
| protocol.txt | ||
| ptrveloc.c | ||
| region.c | ||
| registry.c | ||
| resource.c | ||
| selection.c | ||
| stubmain.c | ||
| swaprep.c | ||
| swapreq.c | ||
| tables.c | ||
| touch.c | ||
| window.c | ||