• onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    48
    arrow-down
    2
    ·
    7 months ago

    There’s a rewrite of sudo happening in rust, but he wants to throw out the SUID idea altogether?

    when invoked under the “run0” name (via a symlink) it behaves a lot like a sudo clone. But with one key difference: it’s not in fact SUID. Instead it just asks the service manager to invoke a command or shell under the target user’s UID. It allocates a new PTY for that, and then shovels data back and forth from the originating TTY and this PTY.

    That sounds like opening up the door to what windows is doing UAC and the wonderful vulnerability that the GOG Launcher had for privilege escalation.

    I’m not a security researcher, but giving arbitrary users the ability to tel PID 1 to run a binary of the user’s choosing is… probably not what Pottering is suggesting, but opens up to such vulnerabilities. And if it’s written in C/C++ my trust is further reduced.

    Anti Commercial-AI license

    • barsoap@lemm.ee
      link
      fedilink
      arrow-up
      6
      ·
      7 months ago

      Giving users access to PID1 running binaries, giving users access to the kernel running binaries as root, I don’t see much difference. SUID was notorious in the past for being leaky, it only ended when distros got serious about fencing use of it in, giving it only to programs actually needing it, making sure that they drop privilege properly, etc.

      If anything I’m in the PID1 camp because it’s more microkernely. But in any case broader userspace shouldn’t really care about the mechanism, only have an API to do it and that API being a bit in the file permissions is soooo 1960s.

    • ulkesh@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      7 months ago

      And if it’s written in C/C++ my trust is further reduced.

      Do you trust Linux? Because if so, have I got news for you.

      • shirro@aussie.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 months ago

        Wait until they hear the language used to implement OpenBSD. Imagine being one of the authors of seL4 encountering a member of the rust cult.