6/28/2026 at 12:04:49 AM
For an article written late last year I hoped for a little more awareness of how massive a security hole granting full, unfiltered access to the X11 server is. Granted, any sandboxing is better than none, but firefox is one of the few apps that already sandboxes itself really well, and with a blog title like that it might be good to touch upon things like nested X servers such as Xephyr.by mid-kid
6/28/2026 at 5:25:47 AM
Yeah, sadly Firefox and Chrome want almost full privileges so that they can sandbox themselves.X itself always bothers me. Xeyes is cute until one considers the practical implications…
by BobbyTables2
6/28/2026 at 7:04:55 AM
> Xeyes is cute until one considers the practical implications…what's the problem with xeyes? it reads data on your computer and displays it. Just like vim or cat.
If, for some reason, you want to run a program that you don't trust, you should sandbox it from the outside. But granting full rights to distro-provided programs like vim or xeyes is perfectly sane. Just like you trust your kernel.
by enriquto
6/28/2026 at 8:29:54 AM
> until one considers the practical implicationsYou failed at that step.
The practical implication is that every other X11 app can also read your input even when it's not in the foreground.
by mike_hock
6/28/2026 at 4:27:05 PM
Every program can listen to keypresses via /dev/inputby throw_await
6/28/2026 at 4:55:30 PM
This is false. A process needs read permission on the relevant `/dev/input/` device, typically by running as root or as a user in a group like `input`. Normal desktop users generally should not be in the input group. Regular applications receive keyboard input through the compositor/windowing system.by nsingh2
6/28/2026 at 7:41:32 AM
> But granting full rights to distro-provided programs like vim or xeyes is perfectly saneSaying this after the whole XZ utils ordeal has happened is quite interesting.
Can you really guarantee that your distro is not compromised? And if it is compromised, how can you easily _discover_ that a program is doing something strange?
X11 (the one that most people are familiar with, not the locked down one with X security -- because the latter introduces compatibility issues) does not have an access control model where programs can request for specific permissions.
In other words, xeyes would just work(TM) without the user granting it permission to read global mouse pointer position. And simultaneously, the same is true for $compromised_distro_provided_program.
by orangeboats
6/28/2026 at 10:35:13 AM
It is the same issue with all sandboxing solutions. If your program does not work without giving it excessive permissions, it does not work. If we want to move to a version with minimal privileges, X would still seem like a good platform to work on this. But one would have to work on it, not decide that everything needs to be rewritten all the time.by uecker
6/28/2026 at 2:39:00 PM
> If we want to move to a version with minimal privilegesThen you would have to cut everything provided by the X protocol into many, smaller, controllable pieces. Because if the permission control is just a switch that says "ability to communicate with the X server", then the whole exercise is rather moot, isn't it.
And when you cut the protocol into smaller pieces...
by orangeboats
6/28/2026 at 3:07:25 PM
No, there is already a secure mode which in the past worked fine but was bit too restrictive for modern clients, and there already exist hooks for fine grained access control.by uecker
6/28/2026 at 8:06:31 AM
> the whole XZ ordeal1 malicious package almost got distributed in 20 years of debian history?
>granting full rights to vim or xeyes
I'm not sure I get what's being discussed here. Standard Xorg runs without root already. And Xeyes definitely 100% run without root, I get why you would you run vim on root, to edit root files, but also don't? Especially if you have plugins, run simple programs like echo>> , ed, grep or nano.
by TZubiri
6/28/2026 at 2:43:06 PM
Obviously, XZ happened on Debian. But $malware can occur on any Linux distribution at any time. For a recent example just look at Arch Linux.Also, are we still assuming that we would still get only one attack over 20 years, instead of the frequency increasing to, say, one attack per year?
---
But those are not my original point, XZ utils was just an example.
My original point is that: why should we not practice defense-in-depth, where we make sure malwares have to jump through multiple hoops (and hope that they trip on one of them!) in order to launch an attack?
>I'm not sure I get what's being discussed here
I think it's the implication that any GUI program running under X can see any other GUI program and watch the user's interaction with the other programs. Vim is a CLI program though though...
by orangeboats
6/28/2026 at 2:23:47 PM
> Saying this after the whole XZ utils ordeal has happened is quite interesting.You do realize that XZ was on github. (Microsoft, PRISM etc.)
by hulitu
6/28/2026 at 7:20:11 AM
> But granting full rights to distro-provided programs like vim or xeyes is perfectly sane.You mean run everything distro-provided as root?
There are reasons systems don't do that any more. Even distro-provided services are often setup in a way to no run with full rights. Can you imaging reasons why this is done?
What was neglected is doing the same on user level, which should be done for pretty much the same reasons.
by throwaway7356
6/28/2026 at 11:30:08 AM
What's your opinion on software like https://www.autohotkey.com/ then?by jcelerier
6/28/2026 at 2:21:33 PM
> firefox is one of the few apps that already sandboxes itself really well,while being one of the few apps that executes Remote Code really well.
by hulitu