XLibre Xserver
Go to file
Olivier Fourdan 2bde9ca49a record: Check for overflow in RecordSanityCheckRegisterClients()
The RecordSanityCheckRegisterClients() checks for the request length,
but does not check for integer overflow.

A client might send a very large value for either the number of clients
or the number of protocol ranges that will cause an integer overflow in
the request length computation, defeating the check for request length.

To avoid the issue, explicitly check the number of clients against the
limit of clients (which is much lower than an maximum integer value) and
the number of protocol ranges (multiplied by the record length) do not
exceed the maximum integer value.

This way, we ensure that the final computation for the request length
will not overflow the maximum integer limit.

CVE-2025-49179

This issue was discovered by Nils Emmerich <nemmerich@ernw.de> and
reported by Julian Suleder via ERNW Vulnerability Disclosure.

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/2024>
2025-06-17 14:21:24 +02:00
.gitlab-ci ci: Install XCB dependencies for meson tests 2025-02-26 09:57:07 +01:00
Xext Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
Xi Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
composite composite: initialize border clip even when pixmap alloc fails 2025-02-25 11:43:01 +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 os: Do not overflow the integer size with BigRequest 2025-06-17 14:21:10 +02:00
doc Revert "misc.h: drop LengthRestB() macro" 2025-06-13 22:30:27 +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 Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
include Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
man man pages: strip trailing whitespace 2025-05-31 14:51:24 -07:00
mi Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
miext Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07:00
os os: Account for bytes to ignore when sharing input buffer 2025-06-17 14:21:24 +02: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 Revert "randr: let SProc*'s call their Proc*'s directly" 2025-06-11 13:44:43 -07:00
record record: Check for overflow in RecordSanityCheckRegisterClients() 2025-06-17 14:21:24 +02:00
render render: Avoid 0 or less animated cursors 2025-06-17 14:18:58 +02:00
test test: remove extra return 2025-04-19 17:02:15 +00:00
xfixes xfixes: Check request length for SetClientDisconnectMode 2025-06-17 14:21:24 +02:00
xkb Revert "os: move BUG_*() macros to own private header" 2025-06-13 17:13:54 -07: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: fix missing runner tag on FreeBSD jobs after gitlab migration 2025-04-01 18:02:55 +00:00
.mailmap Update mailmap for Peter Harris 2025-04-15 13:49:13 -04: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: print a summary of the DDX to build 2025-03-24 03:05:35 +00: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 pkgconfig files: Add URL 2025-03-09 07:32:28 +00: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