Disallow byte-swapped clients by default

The X server swapping code is a huge attack surface, much of this code
is untested and prone to security issues. The use-case of byte-swapped
clients is very niche, so let's disable this by default and allow it
only when the respective config option or commandline flag is given.

For Xorg, this adds the ServerFlag "AllowByteSwappedClients" "on".
For all DDX, this adds the commandline options +byteswappedclients and
-byteswappedclients to enable or disable, respectively.

Fixes #1201

https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1029

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2022-12-20 10:42:03 +10:00
commit 412777664a
7 changed files with 31 additions and 1 deletions

View file

@ -114,6 +114,12 @@ pattern. This is the default unless -retro or -wr is specified.
.B \-bs
disables backing store support on all screens.
.TP 8
.B \+byteswappedclients
Allow connections from clients with an endianess different to that of the server.
.TP 8
.B \-byteswappedclients
Prohibit connections from clients with an endianess different to that of the server.
.TP 8
.B \-c
turns off key-click.
.TP 8