Skip to content
systemcoding.dev
Topic

Security

Memory-safety bugs and the mitigations against them, secure boot, firmware analysis, fuzzing and defensive reverse engineering.

Flat illustration of a shield with a lock, a key and a password field, with the C, Rust and OpenSSL logos.
Security

Off-by-One Errors in C String Handling

One byte too few for the terminating NUL is enough to corrupt memory. See the common off-by-one patterns in C strings and how to write them correctly.

6 min read
Flat illustration of a shield with a lock, a key and a password field, with the Linux, C and Rust logos.
Security

Write a seccomp Filter With libseccomp

Build a default-deny seccomp allow-list in C with libseccomp, add an argument rule that limits write to one file descriptor, and inspect the generated BPF.

6 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.