How do i you decide whats safe to run

I recently ran Gossa on my home server using Docker, mounting it to a folder. Since I used rootless Docker, I was curious - if Gossa were to be a virus, would I have been infected? Have any of you had experience with Gossa?

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    While docker isn’t perfect saying it is completely insecure is untrue. It is true serious vulnerabilities popup once and a while but to say that it is trivial to escape a container is to big of a statement to be true. You can misconfigure a docker container which would allow for an escape but that’s about it for the most part. The Linux kernel isn’t easy to exploit as if it was it wouldn’t be used so heavily in security sensitive environments.

    For added security you could use podman with a dedicated user for sandboxing. If the podman container is breached it will have little place to go. Also Podman tends to have better isolation in general. There isn’t any way to break out of a properly configured docker container right now but if there were it would mean that an attacker has root

    • kevincox@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      I never said it was trivial to escape, I just said it wasn’t a strong security boundary. Nothing is black and white. Docker isn’t going to stop a resourceful attacker but you may not need to worry about attackers who are going to spend >$100k on a 0-day vulnerability.

      The Linux kernel isn’t easy to exploit as if it was it wouldn’t be used so heavily in security sensitive environments

      If any “security sensitive” environment is relying on Linux kernel isolation I don’t think they are taking their sensitivity very seriously. The most security sensitive environments I am aware of doing this are shared hosting providers. Personally I wouldn’t rely on them to host anything particularly sensitive. But everyone’s risk tolerance is different.

      use podman with a dedicated user for sandboxing

      This is only every so slightly better. Users have existed in the kernel for a very long time so may be harder to find bugs in but at the end of the day the Linux kernel is just too complex to provide strong isolation.

      There isn’t any way to break out of a properly configured docker container right now but if there were it would mean that an attacker has root

      I would bet $1k that within 5 years we find out that this is false. Obviously all of the publicly known vulnerabilities have been patched. But more are found all of the time. For hobbyist use this is probably fine, but you should acknowledge the risk. There are almost certainly full kernel-privilege code execution vulnerabilities in the current Linux kernel, and it is very likely that at least one of these is privately known.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 months ago

        I think speculation is generally a bad security practice. What you need is least privilege and security in depth. At some point you need to trust something somewhere. Kernel level exploits are very rare

        • kevincox@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 months ago

          I think assuming that you are safe because you aren’t aware of any vulnerabilities is bad security practice.

          Minimizing your attack surface is critical. Defense in depth is just one way to minimize your attack surface (but a very effective one). Putting your container inside a VM is excellent defense in depth. Putting your container inside a non-root user barely is because you still have one Linux kernel sized hole in your swiss-cheese defence model.

          • Possibly linux@lemmy.zip
            link
            fedilink
            English
            arrow-up
            0
            ·
            2 months ago

            How is the Linux kernel more insecure than anything else? It isn’t this massive gapping hole like you make it sound. In 20 years how many serious organization destroying vulnerabilities have there been? It is pretty solid.

            I guess we should all use whatever proprietary software thing you think is best

            • kevincox@lemmy.ml
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 months ago

              The Linux kernel is less secure for running untrusted software than a VM because most hypervisors have a far smaller attack surface.

              how many serious organization destroying vulnerabilities have there been? It is pretty solid.

              The CVEs differ? The reasons that most organizations don’t get destroyed is that they don’t run untrusted software on the same kernels that process their sensitive information.

              whatever proprietary software thing you think is best

              This is a ridiculous attack. I never suggested anything about proprietary software. Linux’s KVM is pretty great.