cross-posted from: https://lemmy.ml/post/13397700
Malicious KDE theme can wipe out all your data
Or is it just buggy?
For those that don’t want to go back to the Dark side (Reddit), the post referenced a theme (Grey Layout global theme) which got KDE Dev’s involved who in reaction removed the listing from the store.
In short - the theme ran code to run a rm -rf on the user’s drive which wiped everything during install. Aside from backing up your data religiously, be sure to inspect the code instead of blindly installing for now. KDE Dev’s said they will need to do better so I expect some changes are afoot to provide better security.
Great time to mention tools like testdisk that can easily recover data that has been recently deleted on common filesystems.
Btrfs.
Though nothing can replace a proper backup
Seems like a ~~blessing ~~ glaring kde bug, I mean how is it possible? Why a theme needs to be able to execute shell commands?
Themes are very powerful beings in KDE. they can install SDDM themes and scripts, they can set Kvantum themes, custom parameters for other parts of the system etc.
You can’t really do that shit without scripting
It’s really not uncommon for a lot of themes to package an installer script, in case they have multiple versions, or multiple colors bundled. Realistically, they should just each have their own store page, but it’s a colossal pain in the ass. The Catppuccin global theme, for example, has 16 color variants, 2 decoration variants each, and then also a version with no splash. The whitesur theme is similar.
I do agree though that if this is going to continue to exist, it should not have permissions it has today
Because themes are not just skins, as I understand. Themes are a collection of a lot of different kinds of components, from color schemes and fonts to window decorations and to a custom interactive SDDM menu as the other commenter said.
We really need better sandboxing for the desktop. I see why scripting can useful for themes, but why the heck would they have so much fs access?
i can do that too with --no-preserve-root but you don’t see me bragging.
It is a bug, and not only that, it is KDE6 related lmao. It’s the steam bug again!
On the Reddit thread people, at least one of them tagged as a KDE dev, mentions that widgets NEED to be able to run arbitrary code. I am absolutely baffled by this.
Aren’t widgets pieces of software? Of course they have to run code. But they need to be isolated, or at the very least not have sudo access.
I think the theme mentioned probably don’t have sudo access, just user access can do enough harm already.
I think rm command should refuse to remove overly-broad target (home, xdg dirs, media drives) without confirmation in the command line.
Ok, then a bad actor could enumerate all the subdirs and delete them one by one.
Even if going down this path would be a good solution, I don’t think this is
rm’s job to do. This should be done byan antivirusa security suite. I think I have read that for the past few years the kernel now has a better API than inotify to get notified by file operations. I don’t remember it’s name, but I think it was even mentioned in the docs that security software is a use case of itThis is not a defense against bad actor, but defense against bugs in bash script, which is quite common. Another idea is to introduce a new trash command
xdg-trashto replacerm. But both of these cannot stop malicious actors removing your file.I think even if we have a security suite, it is unlikely to detect bad actor recursively enumerating the file and delete them one by one, until many files were irrversably lost.
Antivirus has never been a proper way to achieve security, I think the proper way to defend against offensive
rmis probably sandboxing.
This is why you back up your data!
I use both Timeshift and Lucky Backup.
Timeshift is setup to back up the entire OS and user data and fire off a backup when updating (onto an internal drive).
Lucky Backup has been setup to do a one way sync of my user folders (doc’s, download, pictures, videos etc) onto an external drive.
Lucky Backup is a fantastic piece of software. It is the perfect amount of GUI to spread over rsync.






