3 ms·
Ha. It isn't. User namespaces allow you to do this attack: I have a reproduction here: https://github.com/sargun/fuse-example https://github.com/sargun/fuse-exa
by sargun 7y ago
Ha. It isn't. User namespaces allow you to do this attack:
I have a reproduction here:
https://github.com/sargun/fuse-example https://github.com/sargun/fuse-example
Basically, what’s happening is that the FUSE daemon which is the one
handling the FUSE requests has /dev/fuse open. There is a thread in
that FUSE daemon. let’s call the FUSE daemon P10, and the thread P11.
P10 wires up a FUSE filesystem on /tmp, it opens /dev/fuse with FD5
P11 enacts an uninterruptible (blocking operation) on /tmp/foo, called
OP1, and /tmp/foo is FD6.
P10 reads the operation (OP1) from /dev/fuse, so now OP1 is in userspace
----The Pid 1 of the namespace is killed--
P10 just terminated, and cannot make progress. It will never respond
to OP1. FD5 and FD6 remain open, because P11 is in uninterruptible
sleep.
P11 is in an uninterruptible disk sleep waiting for OP1 to respond,
and the fuse connection never aborts.
FUSE abortion doesn’t kick in because the FD of `/dev/fuse` that P10
originally opened as the FUSE daemon under FD5 will not be closed
until all threads as part of the process are terminated. The mount
namespace wont be torn down until P11 is torn down. P11 will never be
torn down because it’s waiting for someone to do something.