xserver/os
Olivier Fourdan 41ae2e70ad os: Account for bytes to ignore when sharing input buffer
When reading requests from the clients, the input buffer might be shared
and used between different clients.

If a given client sends a full request with non-zero bytes to ignore,
the bytes to ignore may still be non-zero even though the request is
full, in which case the buffer could be shared with another client who's
request will not be processed because of those bytes to ignore, leading
to a possible hang of the other client request.

To avoid the issue, make sure we have zero bytes to ignore left in the
input request when sharing the input buffer with another client.

CVE-2025-49178

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>
(cherry picked from commit d55c54cecb)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2026>
2025-06-17 15:08:02 +02:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
access.c os: Fix NULL pointer dereference 2024-09-24 11:33:13 +02:00
alloc.c os: move alloc functions to separate source file 2024-02-29 10:09:37 +00:00
auth.c os: move mitauth prototypes to separate header 2024-02-22 23:42:52 +00:00
auth.h os: move Auth* function types to separate header 2024-02-22 23:42:53 +00:00
backtrace.c Fix missing include of <sys/wait.h> 2024-03-18 23:02:45 +00:00
busfault.c os: Fix iteration over busfaults 2017-02-23 09:20:48 +10:00
client.c Return NULL in *cmdname if the client argv or argv[0] is NULL 2024-09-24 10:47:54 +02:00
connection.c os/connection: Make sure partial is initialized 2025-02-04 09:21:13 +01:00
fmt.c os: move out Format*() functions 2024-03-09 17:34:51 +00:00
fmt.h os: move out Format*() functions 2024-03-09 17:34:51 +00:00
inputthread.c os, shm: fcntl()'s third argument is integer, not pointer 2020-12-18 09:36:30 -05:00
io.c os: Account for bytes to ignore when sharing input buffer 2025-06-17 15:08:02 +02:00
log.c os: move out Format*() functions 2024-03-09 17:34:51 +00:00
meson.build os: move out Format*() functions 2024-03-09 17:34:51 +00:00
mitauth.c os: move mitauth prototypes to separate header 2024-02-22 23:42:52 +00:00
mitauth.h os: move Auth* function types to separate header 2024-02-22 23:42:53 +00:00
oscolor.c os: color: fix possible buffer overflow vulnerability 2024-02-22 23:33:34 +00:00
osdep.h os: Explicitly include X11/Xmd.h for CARD32 definition to fix building on i686 2024-07-04 08:36:40 +00:00
osinit.c os: consolidate busfault handling 2024-02-23 23:15:12 +00:00
ospoll.c ospoll: Fix Solaris ports implementation to build on Solaris 11.4 2019-09-23 15:12:01 -07:00
ospoll.h os: Add ospoll interface [v2] 2016-07-21 15:04:47 -04:00
reallocarray.c Import reallocarray() from OpenBSD 2015-04-21 16:57:08 -07:00
rpcauth.c os: rpc: fix type mismatch 2024-03-21 22:57:40 +00:00
rpcauth.h os: move Auth* function types to separate header 2024-02-22 23:42:53 +00:00
strcasecmp.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strcasestr.c os: fix mising prototype / include on WIN32 builds 2024-03-03 23:02:54 +00:00
string.c os: move string functions to separate source file 2024-02-29 10:09:37 +00:00
strlcat.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strlcpy.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
strndup.c os: Ensure <dix-config.h> is included in strndup.c 2013-02-14 09:20:46 -08:00
timingsafe_memcmp.c timingsafe_memcmp: Fix meson build 2017-05-10 10:56:16 -04:00
utils.c os: move SELinux enforcement state to the extension 2024-03-25 19:40:04 +00:00
WaitFor.c os: NextDPMSTimeout: mark intentional fallthroughs in switch 2025-02-04 09:17:35 +01:00
xdmauth.c os: move xdmauth prototypes to separate header 2024-02-22 23:42:52 +00:00
xdmauth.h os: move Auth* function types to separate header 2024-02-22 23:42:53 +00:00
xdmcp.c os: fix missing include of <errno.h> 2024-03-21 17:32:30 +01:00
xdmcp.h Fix build with -Dxdmcp=false 2024-02-25 11:55:56 +01:00
xprintf.c Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
xserver_poll.c os: Fix build of xserver_poll.c on MinGW 2019-05-18 14:59:38 +00:00
xsha1.c include: move xsha1.h to os/ 2024-03-03 23:11:05 +00:00
xsha1.h include: move xsha1.h to os/ 2024-03-03 23:11:05 +00:00
xstrans.c Clean up a couple of warnings in os/ 2013-10-31 16:58:12 -07:00