Sandboxing a Linux application
summary
Walks through building a sandbox by composing Linux namespaces and seccomp filters: creates user namespaces and writes /proc/self/uid_map and setgroups to map a real uid to uid 0, uses pivot_root plus bind mounts to create a minimal root with only lib64 and the application, forks so the child becomes PID 1 inside a new pid namespace, and strips networking by moving interfaces or using veth pairs. Shows raw BPF seccomp is brittle and instead uses libseccomp for syscall and argument checks; mentions cgroups and SELinux and warns slide code omits error handling.
AI-written summary · about
chapters (10)
- 0:00Intro
- 1:36What is a sandbox
- 5:31namespaces
- 6:56uid namespace
- 11:22mount namespace
- 17:52get rid of processes
- 22:51Network namespace
- 26:35Other namespaces
- 29:24Writing filters
- 35:51Checking arguments
related talks
01h 25mSandboxing a Linux Application
01h 02mSandboxing a Linux Application
38mSandboxing in Linux with zero lines of code
11mPlaying in the Sandbox: A Study on the Usability of Seccomp
50mLinux Security and How Web Browser Sandboxes Really Work
32mLinux user namespaces: a blessing and a curse
37mSandboxing Applications with Landlock
01h 31mTutorial: Using Linux Primitives to Build Your Own Containers
