-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop in-container /proc requirement? #1734
Comments
So, the short version of my opinion on this is that removing the My comment in #1726 was a bit of a jumbled mess. The thrust of my point is that there are several theoretical security issues in
Can you clarify what you mean here? The O_PATH and re-opening trick is necessary to protect against container escapes -- we could send it via a unix socket, but that feels more complicated. My goal would be to get
This can be done without needing
At the moment I'd rather not detail the exact security risks we have with
I think that the key benefit of removing the |
On Thu, Feb 22, 2018 at 11:47:20PM -0800, Aleksa Sarai wrote:
> opening the start-signal FIFO, but we can inherit a socket through
> from outside withough reopening.
Can you clarify what you mean here? The O_PATH and re-opening trick
is necessary to protect against container escapes -- we could send
it via a unix socket, but that feels more complicated.
I'll work up a PR and we'll see how complicated it ends up being.
> closing extra file descriptors, but we can handle that before
> leaving the host mount namespace.
This can be done without needing `/proc` at all -- you can do what
`rpm` does, where you do a `fnctl(fd, F_GETFD)`. The downside though
is that you don't know which FDs are actually mapped, so it's quite
expensive to check all of them (it would be nice if there was a
syscall API for this -- but I wouldn't bet on this being a popular
request).
But where are these extra file descriptors coming from? If we use the
*host* /proc to close them off before leaving the host mount
namespace, and we CLOEXEC everything we open internally and do not
intend to pass on, there should be no need to check again inside the
container mount namespace. Again, I can work up a PR and we'll see
how this works out.
At the moment I'd rather not detail the exact security risks we have
with `/proc` in public…
That's fine; for the purpose of this issue it's enough to know that
your insurmountable issues were with protecting a container-side
/proc, not about removing our need for one.
|
Spun off from #1726, it would be nice to not require
/proc
inside containers. Current blockers:start
-signal FIFO, but we can inherit a socket through from outside withough reopening.Do we need
/proc
for anything else? @cyphar seems to imply we do (or I'm reading him wrong). This is definitely an edge case, but I'd like to get it working.The text was updated successfully, but these errors were encountered: