Better HN
topnewbestaskshowjobs
Log inSign up

Ohjohng8

13 karma · joined Jul 19, 2018 (8y ago) · 2 submissions

Submissions

comment 8y ago · link · parent

I think in linux you could already do this if you wanted to.

unprivileged user namespace + mount namespace -> mount some tmpfs, bind-mount (optionally read-only or noexec), pivot_root and you got an isolated view of the filesystem. You could write a wrapper around that which provides a streamlined API in the fashion of unveil.

It's what sandboxes and containers runtimes do. Instead it could also be made into a security library which processes could use as part of their startup sequence.

Basically, the linux building-blocks (seccomp, namespaces, privileges) are more low-level and you need to assemble pledge/unveil-like abstractions from them. But I am not aware of any established library that does that in a convenient fashion.

comment 8y ago · link · parent

I assume that is intended as a security feature to prevent TOCTTOU bugs, especially when a process does not use the *at family of syscalls.

I.e. a malicious process can't swap directories under your nose.