
seccomp-bpf Explained: Filtering System Calls
How seccomp-bpf lets a process install a classic BPF filter that allows, blocks or kills on each system call, with the return actions and a working C example.
Everything you need to level up your coding skills.

How seccomp-bpf lets a process install a classic BPF filter that allows, blocks or kills on each system call, with the return actions and a working C example.

Learn real, effective and saved user IDs, what setuid does at execve, and the correct order to drop privileges in C with setgroups, setgid and setuid.

Use setcap to give a binary only CAP_NET_BIND_SERVICE instead of making it setuid root, and see how the file capability bits change what the program can do.

Linux capabilities split root's power into about forty separate privileges, so a process can bind port 80 without being able to load kernel modules.

Fuzz C and C++ with libFuzzer and AFL++ on Clang 19: write targets, use sanitizers, build corpora and dictionaries, triage crashes and run fuzzing in CI.

Every GCC and Clang hardening flag that matters, with its minimum version, cost and effect on the binary, plus Make, CMake and Meson recipes and checks.

A map of memory-safety bugs in C and C++, from stack overflows to use-after-free and type confusion, with the habits, tools and flags that stop each one.

Build a Linux process sandbox layer by layer: drop root and capabilities, add namespaces, seccomp, Landlock, cgroups and systemd limits, then test what escapes.
We send one email when a new post is published. No spam.