Skip to content

Improve security xserver deny working with sockets#2101

Open
GermanAizek wants to merge 1 commit intoX11Libre:masterfrom
GermanAizek:deny-sockets-seccomp
Open

Improve security xserver deny working with sockets#2101
GermanAizek wants to merge 1 commit intoX11Libre:masterfrom
GermanAizek:deny-sockets-seccomp

Conversation

@GermanAizek
Copy link
Copy Markdown
Contributor

@GermanAizek GermanAizek commented Feb 22, 2026

Since some local xserver users do not use remote desktops and terminals, they do not need to handle network traffic, this blocking at the level of Linux seccomp kernel component will reduce vector of attacks from xf86 drivers and X applications that, for example, try to scan ports via /proc/tcp on local and remote hosts. Obviously, this malicious action to disclose information about user's network should be stopped or notified of suspicious activity. I suggest blocking sockets at the compilation level for now in meson.build, but in the future can make a separate flag in X config.

References:

@GermanAizek GermanAizek force-pushed the deny-sockets-seccomp branch 2 times, most recently from df4de11 to 62e2f04 Compare February 22, 2026 03:56
@metux
Copy link
Copy Markdown
Contributor

metux commented Feb 23, 2026

tcp can already be disabled easily on command line.

@GermanAizek
Copy link
Copy Markdown
Contributor Author

tcp can already be disabled easily on command line.

@metux,
seccomp allows you to directly forcibly disable the invocation of certain kernel system calls if there is a Command Injection anywhere in X11Libre.

Analogues in FreeBSD and OpenBSD:

@metux
Copy link
Copy Markdown
Contributor

metux commented Mar 9, 2026

tcp can already be disabled easily on command line.

@metux, seccomp allows you to directly forcibly disable the invocation of certain kernel system calls if there is a Command Injection anywhere in X11Libre.

Sure. But I somehow feel better having those things in a separate launcher/supervisor (that's possibly even OS specific). Putting the whole Xserver into a jail/container is also a good way to go.

@metux metux requested review from a team March 9, 2026 19:05
Since some local xserver users do not use remote desktops and terminals, they do not need to handle network traffic, this blocking at the level of Linux seccomp kernel component will reduce vector of attacks from xf86 drivers and X applications that, for example, try to scan ports via /proc/tcp on local and remote hosts. Obviously, this malicious action to disclose information about user's network should be stopped or notified of suspicious activity. I suggest blocking sockets at the compilation level for now, but in the future can make a separate flag in X config.

References:

- https://en.wikipedia.org/wiki/Seccomp
- https://man7.org/linux/man-pages/man2/seccomp.2.html

Signed-off-by: Herman Semenoff <GermanAizek@yandex.ru>
@metux metux force-pushed the deny-sockets-seccomp branch from 62e2f04 to 8e78f3f Compare April 21, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants