73 points · by shirozuki · 5mo ago · 72 comments
X itself always bothers me. 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.
You 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.
Saying 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.
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.
while being one of the few apps that executes Remote Code really well.
The author of the phoenix x server has blogged about it, iirc.
Which is configured by default on what distros?
Basic X client isolation (not using XACE just Xsecurity) would have worked for sandboxed applications with some minor changes (allowing access to some basic modern extensions, I had a local patch for this once). There is really not fundamental issue in X that could now allow isolation of clients.
It is my understanding that XACE doesn't actually provide any security features itself. It just provides the "hooks" to implement security extensions. Like LSM feature in Linux kernel. You have to install a additional X11 extension to do something useful with it.
So the most common X11 security extension is going to be xcsecurity which enables the SECURITY extension. It allows a course permission model were applications can be designated as "Trusted" or "Untrusted". That is going to show up in many Linux distributions.
However all applications default to "trusted" because if they are untrusted they tend to cause lots of other annoying problems and crashes a lot of apps, apparently.
In practice the only place it shows up is if you are using "ssh -X". That uses the security extension by default. Which is why there is also a "ssh -Y" that disables it for applications that it breaks.
This sort of thing is why to fix X11 security you have to give up backwards compatibility and create a new X version.
Oh, wait, that is what the X developers did with Wayland.
However I use XFCE, where you can set directly the DPI values of the monitors, so that everything will work fine. I have heard Gnome users complaining about problems with HiDPI, but those are not caused by X11, but by a bad Gnome UI for desktop settings.
So HiDPI is not something at which Wayland is better than X11 and there is no reason to avoid HiDPI. At a higher DPI, OTF/TTF typefaces are rendered much more beautifully and reading becomes more comfortable.
I do not know if Wayland has any advantage at mixed DPI, because I have rarely used such configurations.
https://github.com/X11Libre/xserver
In the end Red Hat failed to kill off X11. Let's see what happens next. The GTK devs already rejected patches for maintaining the toolkit further for the xorg platform, following their "GTK5 will no longer support x11" agenda. Would be kind of great to have a universal GUI toolkit that would work rather than have toolkits controlled de-facto by private companies who just willy-nilly throw out support for this or that platform at their own selfish discretion. Though, someone else now helps maintain gtk2, though most of the patches are in regards to fixing bugs, ensuring that it can be compiled and so forth. https://git.devuan.org/Daemonratte/gtk2-ng
In all seriousness, it is another stark reminder why you never rewrite from the ground up. Especially when you're replacing a foundational technology like the display server. In the same time Microsoft reworked their display driver model twice without requiring a single change from application developers. The Linux world doesn't have that many application developers, we should not be asking them to continually chase newer and newer APIs. A rolling stone gathers no moss.
Oh no, not this again. The design of Wayland started 18 years ago, but the stabilization happened 14 years ago, and the _convincing_ across the ecosystem obviously happened way later than that.
I would put the year closer to 2016, when distros started to consider Wayland as an option.
Youngins just don't wanna learn it
Sure, major version revisions that break the previous API exist. But in my experience there's a new one every couple of years, like branches on a tree, the main trunk will never change.
https://docs.redhat.com/en/documentation/red_hat_enterprise_...
I have little experience with lxc but I guess waypipe could be an option too.
https://github.com/X11Libre/xserver/blob/master/doc/Xnamespa...
edit: phoenix was the name: https://github.com/external-mirrors/phoenix#phoenix
XFree86, which is the "standalone DDX" you see on X11 desktops, is being actively maintained.