Find a file
Peter Hutterer af8612df4e Xi: disallow passive grabs with a detail > 255
The XKB protocol effectively prevents us from ever using keycodes above
255. For buttons it's theoretically possible but realistically too niche
to worry about. For all other passive grabs, the detail must be zero
anyway.

This fixes an OOB write:

ProcXIPassiveUngrabDevice() calls DeletePassiveGrabFromList with a
temporary grab struct which contains tempGrab->detail.exact = stuff->detail.
For matching existing grabs, DeleteDetailFromMask is called with the
stuff->detail value. This function creates a new mask with the one bit
representing stuff->detail cleared.

However, the array size for the new mask is 8 * sizeof(CARD32) bits,
thus any detail above 255 results in an OOB array write.

CVE-2022-46341, ZDI-CAN 19381

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 51eb63b0ee)
2022-12-14 11:30:10 +10:00
.gitlab-ci ci: Test ninja dist in meson jobs 2021-01-22 17:03:16 +00:00
composite Drop Xorg DDX 2021-02-03 18:10:48 +01:00
damageext Drop autotools build system 2021-02-03 17:59:31 +01:00
dbe Drop Xorg DDX 2021-02-03 18:10:48 +01:00
dix dix: Guard against non-existing PtrFeedbackPtr 2021-02-17 11:55:19 +00:00
doc Drop autotools build system 2021-02-03 17:59:31 +01:00
dri3 Drop Xorg DDX 2021-02-03 18:10:48 +01:00
fb Drop Xorg DDX 2021-02-03 18:10:48 +01:00
glamor glamor: Fix handling of 1-bit pixmaps 2021-10-18 14:17:28 +02:00
glx glx: Set ContextTag for all contexts 2021-06-21 11:16:58 +02:00
hw xwayland: Always hook up frame_callback_list in xwl_present_queue_vblank 2022-07-20 14:41:01 +00:00
include Use EGL_LINUX_DMA_BUF_EXT to create GBM bo EGLImages 2021-10-18 14:17:28 +02:00
man Drop autotools build system 2021-02-03 17:59:31 +01:00
mi Drop Xorg DDX 2021-02-03 18:10:48 +01:00
miext Drop miext/shadow directory 2021-02-03 18:17:09 +01:00
os Drop autotools build system 2021-02-03 17:59:31 +01:00
present Drop Xorg DDX 2021-02-03 18:10:48 +01:00
randr randr: Bail from RRTellChanged if there's no root window yet 2021-07-09 12:10:27 +02:00
record record: Fix out of bounds access in SwapCreateRegister() 2021-12-14 14:51:49 +01:00
render render: Fix out of bounds access in SProcRenderCompositeGlyphs() 2021-12-14 14:51:49 +01:00
test xwayland/test: Don't catch errors in run-piglit.sh 2021-10-21 11:35:36 +02:00
Xext Xtest: disallow GenericEvents in XTestSwapFakeInput 2022-12-14 11:30:09 +10:00
xfixes xfixes: Fix out of bounds access in *ProcXFixesCreatePointerBarrier() 2021-12-14 14:51:49 +01:00
Xi Xi: disallow passive grabs with a detail > 255 2022-12-14 11:30:10 +10:00
xkb xkb: add request length validation for XkbSetGeometry 2022-07-12 15:30:03 +02:00
.appveyor.yml Drop config directory 2021-02-03 18:15:10 +01:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.gitignore .gitignore: Add new autotools file 'test-driver' 2014-04-21 13:41:42 -07:00
.gitlab-ci.yml Don't install Xvfb 2021-02-03 18:22:18 +01:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
devbook.am doc: Create a script to filter xmlto output 2015-01-05 14:24:06 -08:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
manpages.am man: Fix automake seddery 2018-05-08 12:15:30 -04:00
meson.build Bump version to 21.1.4 2021-12-14 14:51:49 +01:00
meson_options.txt meson: Build Xwayland unconditionally 2021-02-03 18:21:08 +01:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -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