Title. Just had this baseless yet possible idea on my head and I'd like to know how wrong it is? Since afaik, "nobody" has absolutely zero permissions… other than the ones given by the user. Pretty sure I'm missing something vital or important, but… I'm completely fine being called dumb every now and then.

Thanks in advance.

  • dack@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    With rootless containers, even root in the container is basically useless anyway because it truly runs as a fake ID on the host.

    I've seen this repeated a lot, but I'm not really convinced running as root inside containers is a good/safe thing to do. User namespaces can provide some protection for the host, but that does nothing for the rest of the files inside the guest. For example, consider a server software with an arbitrary file write vulnerability. If the process is running as a low privilege user, exploiting the vulnerability might not really get you anywhere. If it's running as root, it's basically a free pass to root privilege and arbitrary code execution within the container.

    • Max-P@lemmy.max-p.me
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      That's why I mentioned rootless containers specifically. In those, root is at most the user running the container. It can't do a whole lot, because it's not really root. Each user in /etc/subuid gets a range of dummy IDs >65535 specifically for containers for that user. When outside the container, everything shows as owned by the user, so root in the container can't even result in root owned files on the host, so no suid trickery or anything.

      Of course you should still run as a user in the container too, I was just pointing out in rootless containers the blast radius is much reduced because of that feature. Definitely still don't want root for many other reasons.