Sandboxing a Linux Application
summary
Walks through building a minimal but fragile Linux sandbox that actually runs an injected binary, demonstrating use of namespaces (user, mount, pid, net), replacing root with pivot_root rather than chroot, filtering syscalls with seccomp (libseccomp to avoid raw BPF pain), and limiting resources with cgroups v2. Shows live failures (missing /proc, killed syscalls, OOM when memory limits hit), warns the code is unsafe for production, and explains how Docker and Chromium reuse these APIs.
AI-written summary · about
chapters (20)
- 0:00Start
- 3:54What Is a Sandbox
- 5:04Why Would You Sandbox
- 11:58Ld Preload
- 17:27Namespaces
- 18:10Permission Model
- 20:42Create a New Username Space
- 31:36Pivot Route
- 39:16Network Namespace
- 44:22Secomp
- 48:51Checking Architecture
- 53:49Checking of Arguments
- 56:13Architecture Check
- 59:53How Can I Compare Strings
- 1:05:47C Groups
- 1:12:46Memory Controller
- 1:15:57Disable the Memory Controller
- 1:17:27Cpu Burn
- 1:18:47Cpu Weight
- 1:22:04Cpu Set
related talks
42mSandboxing a Linux application
01h 02mSandboxing a Linux Application
38mSandboxing in Linux with zero lines of code
50mLinux Security and How Web Browser Sandboxes Really Work
46mLinux Security APIs and the Chromium Sandbox
55mLinux Security APIs and the Chromium Sandbox
01h 31mTutorial: Using Linux Primitives to Build Your Own Containers
22mSandboxes all the way down - A hitchhiker's guide to platform...
