XLibre Xserver
Go to file
Olivier Fourdan bba9df1a9d Xi: Fix barrier device search
The function GetBarrierDevice() would search for the pointer device
based on its device id and return the matching value, or supposedly NULL
if no match was found.

Unfortunately, as written, it would return the last element of the list
if no matching device id was found which can lead to out of bounds
memory access.

Fix the search function to return NULL if not matching device is found,
and adjust the callers to handle the case where the device cannot be
found.

CVE-2025-26598, ZDI-CAN-25740

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

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
2025-02-25 11:43:01 +01:00
.gitlab-ci ci: update XTS to a commit that doesn't require -fcommon workaround 2025-02-17 19:16:04 +00:00
Xext Xext: dpms: need to include geext.h 2025-02-24 20:19:55 +00:00
Xi Xi: Fix barrier device search 2025-02-25 11:43:01 +01:00
composite composite: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
config linux: Fix BUS_PLATFORM detection for non-PCI devices 2025-02-07 15:10:17 +00:00
damageext os: unexport SetCriticalOutputPending() 2025-02-23 17:39:18 +00:00
dbe dbe: fix byte swapping in SProcDbeSwapBuffers() 2025-02-24 16:24:53 +01:00
dix dix: keep a ref to the rootCursor 2025-02-25 11:43:01 +01:00
doc os: drop unused TimerCheck() 2025-02-23 17:46:13 +00:00
dri3 os: unexport WriteFdToClient() 2025-02-18 10:53:44 +00:00
exa exa: simplify CreatePixmap()/DestroyPixmap() handlers error pathes 2025-02-12 17:48:30 +01:00
fb fb: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
glamor glamor: explicitly draw endpoints of line segments 2025-02-24 20:39:12 +00:00
glx os: unexport ResetCurrentRequest() 2025-02-18 10:53:45 +00:00
hw panoramix: don't install panoramiX.h and panoramiXsrv.h 2025-02-24 20:06:30 +00:00
include drop not needed includes of geext.h 2025-02-24 20:19:55 +00:00
man Xserver.man: Note that -byteswappedclients is the default in this release 2024-03-23 10:27:03 -07:00
mi os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
miext os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
os os: drop unused TimerCheck() 2025-02-23 17:46:13 +00:00
present present: need to include geext.h 2025-02-24 20:19:55 +00:00
pseudoramiX pseudoramiX: drop swapping request length fields 2025-02-06 22:28:49 +00:00
randr randr: RRScreenInit(): drop unnecessary zero'ing 2025-02-24 20:30:26 +00:00
record os: unexport SetCriticalOutputPending() 2025-02-23 17:39:18 +00:00
render os: move BUG_*() macros to own private header 2025-02-17 19:32:48 +00:00
test test: sync: don't use VLA 2025-02-20 17:28:01 +01:00
xfixes misc.h: unexport compare_version() 2025-02-18 11:17:40 +00:00
xkb xkb: Fix buffer overflow in XkbChangeTypesOfKey() 2025-02-25 11:43:01 +01:00
.appveyor.yml appveyor: Add libxcvt build dep 2021-11-04 13:03:25 +00:00
.dir-locals.el .dir-locals.el: Add missing final newline 2019-10-01 17:05:28 +00:00
.git-blame-ignore-revs Ignore the coding style change commit during git blame 2024-12-06 09:55:53 +10:00
.gitignore Clean up the .gitignore file 2024-01-12 00:50:24 +00:00
.gitlab-ci.yml ci: update freebsd builder image 2025-02-18 10:43:28 +01:00
.mailmap Add a .mailmap file to canonicalize author names and emails 2023-03-15 18:10:51 +00:00
.travis.yml travis: Add OSX meson build to matrix 2019-05-02 15:42:58 +00:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
README.md Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
meson.build meson.build: enable VLA warning 2025-02-20 17:28:05 +01:00
meson_options.txt os: drop SUN-DES-1 authentication 2024-06-18 00:52:11 +00:00
xorg-server.m4 xorg-server.m4: just all cflags instead of just sdkdir 2018-09-20 20:12:24 +01:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05: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