Malicious KDE theme can wipe out all your data - eviltoast
  • jherazob@beehaw.org
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    2
    ·
    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
      20
      ·
      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
            1
            ·
            8 months ago

            This is not a defense against bad actor, but defense against bugs in bash script, which is quit 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 file is 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.

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      8
      ·
      8 months ago

      Widgets are interactive elements that access system APIs to do things like show memory usage, list open programs, send kill signals, script the window manager to hide or move windows, and a lot more.

      You could theoretically sandbox widgets, but I’m not sure how easy that is. I suppose you could wrap KDE itself into a Flatpak sandbox so it can only see the system files it absolutely needs, but all “sandbox every part of the UI” attempts I know of have died because compatibilities made the unusable.