<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Seccomp on Ethan-ZYF</title><link>https://ethanzyf.com/tags/seccomp/</link><description>Recent content in Seccomp on Ethan-ZYF</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 21 May 2026 00:00:00 -0700</lastBuildDate><atom:link href="https://ethanzyf.com/tags/seccomp/index.xml" rel="self" type="application/rss+xml"/><item><title>Week2 Day 4: K8s security — AppArmor</title><link>https://ethanzyf.com/blog/week2-day4-apparmor/</link><pubDate>Thu, 21 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day4-apparmor/</guid><description>&lt;p&gt;AppArmor as the path-based complement to seccomp&amp;rsquo;s syscall-based filtering — and a hands-on lesson in why that complement is harder to deploy. This post covers how K8s wraps AppArmor (&lt;code&gt;securityContext.appArmorProfile&lt;/code&gt;, symmetric with seccomp&amp;rsquo;s three types), why an AppArmor profile is heavier than a seccomp one (it must be pre-loaded into the node&amp;rsquo;s kernel via &lt;code&gt;apparmor_parser&lt;/code&gt;, not just dropped as a file), why &lt;code&gt;deny /data/** w&lt;/code&gt; blocks every syscall that writes there (closing the hole where &lt;code&gt;touch&lt;/code&gt; bypassed yesterday&amp;rsquo;s mkdir block), and the day&amp;rsquo;s most valuable lesson: &lt;strong&gt;the experiment couldn&amp;rsquo;t run at all&lt;/strong&gt; because a Mac/Docker-Desktop kind node has no AppArmor LSM in its kernel — a firsthand encounter with the fail-open trap and the portability problem of AppArmor-based mitigations.&lt;/p&gt;</description></item><item><title>Week2 Day 3: K8s security — seccomp</title><link>https://ethanzyf.com/blog/week2-day3-seccomp/</link><pubDate>Wed, 20 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/week2-day3-seccomp/</guid><description>&lt;p&gt;Where Week 1 and Week 2 meet: K8s seccomp is the &lt;em&gt;same&lt;/em&gt; kernel seccomp from Week 1, except runc installs the BPF filter for you instead of your application. This post traces the full kubelet → containerd → runc chain (and what runc actually does — namespaces, cgroups, NNP, caps, seccomp, AppArmor, then exec), the three profile types (Unconfined / RuntimeDefault / Localhost), why the profile JSON is just the declarative form of the cBPF you&amp;rsquo;d hand-write, why &lt;code&gt;SCMP_ACT_ERRNO&lt;/code&gt; lets the process survive while &lt;code&gt;mkdir&lt;/code&gt; returns EPERM, and the crucial limitation: seccomp blocks &lt;em&gt;syscalls&lt;/em&gt;, not &lt;em&gt;intent&lt;/em&gt; — block &lt;code&gt;mkdir&lt;/code&gt; and &lt;code&gt;touch&lt;/code&gt; (which uses &lt;code&gt;openat&lt;/code&gt;) still creates files. Plus &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/status&lt;/code&gt; as the ground-truth proof a filter is loaded.&lt;/p&gt;</description></item><item><title>Day 4: seccomp BPF Filter (filter mode deep dive)</title><link>https://ethanzyf.com/blog/day4-seccomp-filter/</link><pubDate>Thu, 14 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day4-seccomp-filter/</guid><description>&lt;p&gt;A deep dive into seccomp filter mode: the BPF data layout, why pointer args can&amp;rsquo;t be dereferenced (TOCTOU &lt;em&gt;and&lt;/em&gt; atomic context), the cBPF instruction skeleton, the multi-ABI bypasses every filter must defend against, and the eight &lt;code&gt;SECCOMP_RET_*&lt;/code&gt; actions that power modern container security — including the &lt;code&gt;USER_NOTIF&lt;/code&gt; + fd-injection pattern that runc/crun use.&lt;/p&gt;</description></item><item><title>Day 3: seccomp Basics + Strict Mode</title><link>https://ethanzyf.com/blog/day3-seccomp-strict/</link><pubDate>Wed, 13 May 2026 00:00:00 -0700</pubDate><guid>https://ethanzyf.com/blog/day3-seccomp-strict/</guid><description>&lt;p&gt;How &lt;code&gt;seccomp&lt;/code&gt; intercepts syscalls at the kernel entry, what &lt;code&gt;SECCOMP_MODE_STRICT&lt;/code&gt; actually allows (and the &lt;code&gt;_exit()&lt;/code&gt; trap that fools nearly everyone), plus the design philosophy that filter mode inherits: monotonic, irrevocable security state.&lt;/p&gt;</description></item></channel></rss>