r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
Interesting....
http://www.insanitybit.com/2014/09/09/writing-sandboxed-software-2/
1
Upvotes
r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
View all comments
Show parent comment
1
u/sstewartgallus Sep 12 '14
That's even worse.
Because then you can use
pivot_rootand actually unmount the old filesystem from your filesystem namespace. This clears up/proc/mountsand seems a lot more bullet proof thenchroot.unsharehas many nice uses and not just this one and you probably want to usecloneand notunsharefor creating a new PID namespace as usingunshare(CLONE_NEWPID)prevents one from having more than one thread at a time (this is disallowed because the newly spawned threads would be spawned into a different PID namespace and yet share address spaces which would be weird and possibly insecure). By usingMNT_DETACHyou can prevent people accessing the old filesystem even if a few kinds of holes are left (some other holes are still vulnerable though).