206
submitted 10 months ago by petsoi@discuss.tchncs.de to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] lengau@midwest.social 9 points 10 months ago

That's what xwayland is.

Apps can talk to xwayland with the x11 protocol but instead of an X server rendering it, your Wayland compositor renders it.

The restrictions come from the fact that those x11 behaviours are exactly things the industry has decided are a bad idea and should be replaced.

[-] LainTrain@lemmy.dbzer0.com 0 points 10 months ago

Really? Like not letting apps draw over other apps? As far as I know Windows still allows that, so does even Mac OS. I don't know who in the industry decided that screenshotting is a bad behaviour and needs to be removed but maybe they should find a new industry, like fast food line work for example.

[-] Ullebe1@lemmy.ml 1 points 10 months ago

Allowing any app unrestricted access to the input and output of any other app (like in X11) is a terrible security practice. It allows for trivially easy keyloggers and makes horizontal movement to other apps after the first has been exploited super easy.

Many people's answer to this is "then just don't run untrusted apps, duh", but that is a bad take since that isn't realistic for 99% of users. People run things like Discord or Spotify or games or Nvidia drivers all the time, not to mention random JavaScript on various websites, so the security model should be robust in the presence of that kind of behaviour. Otherwise everyone is just a single sandbox escape in the browser away from being fully compromised by malware installed with root privileges. Luckily we know better now than when X11 was designed and that is the reason for things like Bubblewrap (used in Flatpak for sandboxing), portals and the security model of Wayland.

And in the end: the people who decided this are the people actually willing to do the work to build and maintain the Linux desktop stack. If anyone knows what the right approach is, it's them.

[-] yianiris@kafeneio.social 3 points 10 months ago

Are you comparing 40years of graphical environment stability and global use with something that has been broken for more than a decade and now all of a sudden is portrayed as secure?

I want to start applications as another user in my own environment and my own system and wayland prevents me, while x11 allows me (together with many forms of sandboxing and containerization).

I have asked this question to all pretend to be experts of wayland and I have 0 responses.

@Ullebe1 @LainTrain

[-] Ullebe1@lemmy.ml -1 points 10 months ago

I absolutely am. Calling Wayland "something that has been broken for more than a decade" rather than "something that has been in active development for more than a decade" is also an interesting take. By that measure X.Org is "something that has been broken for almost two decades", so let's just not go there. And I'm not saying that Wayland magically makes everything secure. I'm saying that Wayland (or something like it) is a necessary step if we want a desktop that is secure. I have seen people propose something like nested sandboxed X servers with a single application for each as an alternative, but I think it's probably better to actually fix the underlying problem.

That's an interesting use case. It isn't really anything I've had a need for, so I don't know what the best way to do something like that is. If your compositor doesn't allow it, could it perhaps be possible to run as a different user in a nested compositor, like Cage or gamescope? Also, how do you sandbox the applications X11 access? If they share the same server, then a sandboxed application can just wait for you to launch a terminal and use sudo, at which point it can inject a malicious command as root.

[-] yianiris@kafeneio.social 3 points 10 months ago

I don''t use systemd or logind so I don't have to worry about such magic security violations this bogus pile of crap creates. I have more control of processes and don't allow some "automated" service to be loging-in-out system users 2000 times a nanosecond as logind does.

It only happens when I want it to happen, not uncontrollably.

KISS is the best security measure.

@Ullebe1

[-] Ullebe1@lemmy.ml 0 points 10 months ago

So I guess your question wasn't in good faith then, but just bait so you'd have an excuse to rant about things unrelated to my answer?

The security issue that Wayland helps solve has nothing to with systemd or logind, so I'll just ignore your tirade against them. If you don't want to use them, then good on you.

The issue is an inherent issue with the X11 protocol. It can be worked around, but it can't be fixed without something changing in the protocol on a fundamental level. The core premise that any client can be trusted unquestionably is broken and was broken the second browsers began running JavaScript. Not to mention all the other times most modern computers run opaque code of uncertain origins.

Keeping it simple is definitely a great basis to build a secure system upon, it just can't stand alone because of reasons like the above.

[-] yianiris@kafeneio.social 2 points 10 months ago

What would js be able to do out of firejail or other such forms of containment?

I only allow js for very specific sites, and most that you can't do without I just do without. I am not that worried about security though, it is just an exercise.

I use seatd with wayland but it can be compiled without it too. My main issue is as I said, I can't just run "sudo -u user2 leafpad" for example, you say it is a security measure, I say it is an inconvenience.

@Ullebe1

[-] Ullebe1@lemmy.ml 1 points 10 months ago

The X11 connection is generally an enormous hole in such containment, but yes. Such containment definitely helps. That is why I run as many applications as possible as Flatpaks, as they employ similar countermeasures, and why they're playing an increasingly big role in modern distros.

And it's great that you're risk averse and able to avoid untrusted scripts to that degree. It's just not feasible for the general user, which is why things need to be secure even if a malicious script is mistakenly allowed to execute.

I'm not saying that that specific annoyance is a security measure. I'm saying that the whole paradigm shift that Wayland is is partially motivated by improving security. Such paradigm shifts come with paper cuts, especially in the beginning. But the rough edges are being filed down one by one. That's not to say that Wayland is the answer for everyone yet, nor that it will ever be. There'll always be exceptions. But for the vast majority of users it is, and it helps keep their systems safer than they are without it.

[-] yianiris@kafeneio.social 1 points 10 months ago

> and why they’re playing an increasingly big role in modern distros.

My modern distros, are you implying if a distro adopts flatpak use it is modern, if not it is antiquated?

Those are dangerous doctrines when foss is meant to provide choice, and it can be a choice to reject certain groups of software.

@Ullebe1

[-] Ullebe1@lemmy.ml 1 points 10 months ago

Not at all, seems like you're reading things into it that aren't there.

By modern distros I mean that for the newer variants of multiple large distros (Like Fedora Silverblue and its cousins, openSUSE MicroOS, etc.), even ordinary Ubuntu, Fedora and their derivatives and cousins, across the major DEs like Gnome and KDE, for all of them apps packaged like Flatpaks and Snaps have an increasingly large role.

I'm specifically not saying it's the only way to be modern or that other approaches can't have merit, I'm saying there is a clear trend among some of the largest players in the game.

I think it's dangerous to put words in other peoples mouths and then argue against those imaginary statements, and I think it's sad that you seemingly feel it's the best way to argue for what you believe in. You can do better.

[-] yianiris@kafeneio.social 0 points 10 months ago

You have a very narrow perception of what a linux distribution/system should be, and that is a heavily commercial windows/macos alternative for people who deny reading.
That audience makes total crap popular!

Is that better now?

@Ullebe1

[-] Ullebe1@lemmy.ml 1 points 10 months ago

Not even close, you're even more off base than you were before. I mean what do you even base your ridiculous statements about my opinions and perceptions on?

[-] WarmApplePieShrek@lemmy.dbzer0.com 2 points 10 months ago

X11 doesn't have to allow any app unrestricted access to any other app.

[-] LainTrain@lemmy.dbzer0.com 1 points 10 months ago

I'm a cybersec MSc and the security model you're describing is that of the clipboard.

Apps interacting with each other is also how just about anything works on a computer since multi tasking OSes.

Flatpaks and Snaps are also DOA along with Wayland lol.

[-] Ullebe1@lemmy.ml -1 points 10 months ago

Nice appeal to authority. Are you referring to a formalised security model (of which I'd love to read more, if you have a link?), or the actual clipboard on your PC?

But not all interaction is equal. Access control and granularity of permissions is something X11 is sorely lacking in, which Wayland has built in. Which is why X11 is a bad fit for common treat models and Wayland is not.

Ohh, @LainTrain@lemmy.dbzer0.com said so, so it must be true! I'll let you keep believing that while I enjoy them and watch them grow in popularity and usage, just like Wayland.

[-] LainTrain@lemmy.dbzer0.com 1 points 10 months ago* (last edited 10 months ago)

I'm referring to the actual clipboard on your PC, yes.

Don't get me wrong ofc X is not without issues at all, but Wayland is like chopping off your arm at the elbow because you messed up some nail polish, and you arguing for it is like saying that now since you don't have that arm anymore no one can break it, while all the other OSes watch on in horror and embarrassment as they allow all access to screen elements to any random app like god intended.

If you got malware installed it's all over anyway. Why bother with weird screen access when you can just ransom the home partition and all personal files instead?

Without OBS, Discord, Steam, Guake, proper screenshot tools, etc. it's not really a functional OS anymore for general use and that's what you get with Wayland.

If Wayland fixes all the issues with it I'd happily switch, but it likely won't since they are fundamental to it's design and if so then the only way it will secure Linux desktops is by making no one ever use one again.

this post was submitted on 23 Feb 2024
206 points (97.7% liked)

Linux

48735 readers
948 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS