unshare -r accidentally implies -u (UTS) instead of -U (user), and -r mapping is broken

Urja Rannikko urjaman at gmail.com
Sun Nov 5 10:18:38 UTC 2017


Hi,

On -r being broken:
the uid_map and gid_map for the root mapping should be
"0 %u 1" not "%u 0 1" (i think that tries to map the outside root to
be your user id in the namespace... nope.)

Noticed these while messing about with making an unprivileged user
namespace... Both of these cause things to fail. And the root mapping
can only be done by the process doing the unshare (exec drops
privileges if you're not "root", so you end up stuck as nobody/65534).

-- 
Urja Rannikko


More information about the busybox mailing list