• node815@lemmy.world
    link
    fedilink
    English
    arrow-up
    45
    arrow-down
    1
    ·
    8 months ago

    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.

  • mvirts@lemmy.world
    link
    fedilink
    arrow-up
    40
    ·
    8 months ago

    Great time to mention tools like testdisk that can easily recover data that has been recently deleted on common filesystems.

  • Pantherina@feddit.de
    link
    fedilink
    arrow-up
    31
    ·
    8 months ago

    A ton of extensions are executing scripts, but this is generally behind a warning.

    This REALLY has to change guys, and for that the getnewstuff backend must become better.

    For example Dolphin extensions are still downloaded to some random download location that is not actually used.

    And the packaging of addons is extremely random too.

  • 𝒎𝒂𝒏𝒊𝒆𝒍@lemmy.ml
    link
    fedilink
    arrow-up
    23
    arrow-down
    1
    ·
    edit-2
    8 months ago

    Seems like a ~~blessing ~~ glaring kde bug, I mean how is it possible? Why a theme needs to be able to execute shell commands?

    • dinckel@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      8 months ago

      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

    • ReversalHatchery@beehaw.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      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.

  • fruitycoder@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    8 months ago

    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?

  • Samueru@lemmy.world
    link
    fedilink
    arrow-up
    13
    arrow-down
    2
    ·
    8 months ago

    It is a bug, and not only that, it is KDE6 related lmao. It’s the steam bug again!

  • Dr Jekell@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    2
    ·
    8 months ago

    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.

    • Weazel@feddit.de
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      Stupid question maybe, but would your backups even be safe? Sure, it was mentioned that you had to enter your sudo password, but let’s say you did that because you are careless, “rm -rf” would wipe all connected and mounted drives as well, so your backups would be gone, wouldn’t they? Or does Timeshift mount and unmount on demand? If so, what would happen if you ran “rm -rf” while a backup is being saved?! It seems to me that a simple “make backups” isn’t enough here.

      • kylian0087@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        8 months ago

        I do not know much about Timeshift and Lucky backup. But a proper backup is not a on the same system even if it is a second drive internally. For some quick file recovery after deleting things you shouldn’t have it is fine. A proper backup should be a separate system and ideally 2 systems one externally but this is overkill for most folks. With a separate system you can setup automated backups and disaster recovery. if you are scared the backup system can get compromised from the main system. you can set things up in such a way that the backup works in pull mode and the main system being backed up has no access to the backup system.

        • linuxPIPEpower@discuss.tchncs.de
          link
          fedilink
          arrow-up
          2
          ·
          8 months ago

          Not everyone can have 2 computers for all kinds of reasons.

          Everyone do you best. Prioritize your data and take stronger precautions for the most important.

          • kylian0087@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            8 months ago

            A separate computer/server might be the best but their are many ways. Cloud storage is one of the many options that can be used as well.

    • Pantherina@feddit.de
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      8 months ago

      This is why you shouldnt allow anything to execute arbitrary code without permission

  • jherazob@beehaw.org
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    3
    ·
    edit-2
    8 months ago

    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.

    • Michal@programming.dev
      link
      fedilink
      arrow-up
      22
      ·
      8 months ago

      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.

        • Zamundaaa@discuss.tchncs.de
          link
          fedilink
          English
          arrow-up
          11
          ·
          8 months ago

          Widgets aren’t themes. They’re things on your desktop that people are using for example for showing a folder - and if that can’t interact with the system, that widget’s functionality is broken.

          Of course, that should not apply to install scripts or the like, which shouldn’t be a thing at all really. And it should be made a lot more obvious which downloadable things can execute code / which ones are “guaranteed” safe and which ones may not be.

      • baseless_discourse@mander.xyz
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        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.

        • ReversalHatchery@beehaw.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          8 months ago

          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 by an antivirus a 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 it

          • baseless_discourse@mander.xyz
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            8 months ago

            This 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-trash to 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 rm is probably sandboxing.

    • TheGrandNagus@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      ·
      8 months ago

      This is such a dumb comment. Jesus.

      “I thought passwords were meant to improve security! So how come I got a virus???”

    • Klara@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      This is different from the Wayland security model, as Wayland restricts the ability for clients to modify and read from other clients arbitrarily. This is an extension to a Wayland compositor, and as all extensions do, it contains code which runs on your system. Any code, unless sandboxed, can access your filesystem no matter if it’s run under Wayland, X11, or no windowing system at all for that matter.

      • Zamundaaa@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        8 months ago

        It is not related to Wayland or the compositor in any way. This is a plasmashell extension.

        Similar caveats do apply to KWin scripts and effects though

    • machinya [it/its, fae/faer]@hexbear.net
      link
      fedilink
      arrow-up
      2
      ·
      8 months ago

      wayland was not about avoiding applications accessing resources or running scripts (that is why sandboxing is for) but to avoid programs to have access to the rest of the graphical session (things like input devices and other graphical windows and their data)

    • ReversalHatchery@beehaw.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      It does, when the bad actor is a program you run, and other open windows contain sensitive content.

      Here the bad actor is code being loaded as an extension to the compositor. A bit like a kernel module, which can bypass file access permissions if it wants.