Peter Hutterer dd8caf39e9 xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck
XKB often uses a FooCheck and Foo function pair, the former is supposed
to check all values in the request and error out on BadLength,
BadValue, etc. The latter is then called once we're confident the values
are good (they may still fail on an individual device, but that's a
different topic).

In the case of XkbSetDeviceInfo, those functions were incorrectly
named, with XkbSetDeviceInfo ending up as the checker function and
XkbSetDeviceInfoCheck as the setter function. As a result, the setter
function was called before the checker function, accessing request
data and modifying device state before we ensured that the data is
valid.

In particular, the setter function relied on values being already
byte-swapped. This in turn could lead to potential OOB memory access.

Fix this by correctly naming the functions and moving the length checks
over to the checker function. These were added in 87c64fc5b0 to the
wrong function, probably due to the incorrect naming.

Fixes ZDI-CAN 16070, CVE-2022-2320.

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

Introduced in c06e27b2f6

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-07-12 15:18:52 +03:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2022-04-02 18:06:30 +00:00
2021-10-27 13:15:40 +03:00
2016-05-29 19:20:51 -07:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2021-10-27 13:15:40 +03:00
2022-01-25 16:16:30 +01:00
2022-07-08 14:27:04 +00:00
2021-11-04 13:03:25 +00:00
2020-07-05 13:07:33 -07:00

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct

Description
Truly free fork of the XOrg project.
Readme 91 MiB
Languages
C 96.4%
Roff 1.1%
Objective-C 1%
Meson 0.9%
Shell 0.2%
Other 0.2%