<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Security on Luther Monson</title>
    <link>https://luth.io/categories/security/</link>
    <description>Recent content in Security on Luther Monson</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 29 Sep 2026 20:30:00 -0700</lastBuildDate>
    <atom:link href="https://luth.io/categories/security/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Your Agent&#39;s Shell Allowlist Is Bypassable</title>
      <link>https://luth.io/blog/2026/09/agent-shell-allowlist-bypassable/</link>
      <pubDate>Tue, 29 Sep 2026 20:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/agent-shell-allowlist-bypassable/</guid>
      <description>&lt;p&gt;Every &lt;a href=&#34;https://luth.io/blog/2026/08/shipmates-persona-based-ai-coding-crews/&#34;&gt;shipmates&lt;/a&gt; crew member runs shell commands. Before any of&#xA;them runs, it goes through a permission gate. The gate uses the same rule syntax as Claude Code settings:&#xA;&lt;code&gt;Bash(git status)&lt;/code&gt;, &lt;code&gt;Bash(rm *)&lt;/code&gt;, &lt;code&gt;Write(**/.claude/settings.json)&lt;/code&gt;. The rules are merged from several layers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;a fleet-wide deny list pushed from Fleet Command&lt;/li&gt;&#xA;&lt;li&gt;per-persona policy files&lt;/li&gt;&#xA;&lt;li&gt;project settings&lt;/li&gt;&#xA;&lt;li&gt;the Brig, which compiles shipmates&amp;rsquo; fifteen &amp;ldquo;Ship&amp;rsquo;s Articles&amp;rdquo; into deny and ask rules&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Deny beats ask, ask beats allow.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bind Mounts Across Mount Namespaces: Four PRs and a Container Escape</title>
      <link>https://luth.io/blog/2026/09/bind-mounts-across-mount-namespaces/</link>
      <pubDate>Thu, 24 Sep 2026 21:02:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/bind-mounts-across-mount-namespaces/</guid>
      <description>&lt;p&gt;GitHub Actions has a &lt;code&gt;container:&lt;/code&gt; key that runs a job&amp;rsquo;s steps inside an image of your choosing. It&amp;rsquo;s popular because&#xA;it gives you a reproducible toolchain without building a custom runner image. On a self-hosted runner it works by&#xA;having the runner drive Docker. On &lt;a href=&#34;https://luth.io/blog/2026/08/ephemerd-one-daemon-every-os/&#34;&gt;ephemerd&lt;/a&gt;, &amp;ldquo;Docker&amp;rdquo; is a shim that&#xA;speaks the Docker API and creates containers in containerd. Getting bind mounts right through that shim took four PRs&#xA;in a week. A couple of months later the version that worked turned out to be an escape.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Every Way a Tenant Escaped: A Cross-Tenant Breakout Field Guide</title>
      <link>https://luth.io/blog/2026/09/cross-tenant-breakout-field-guide/</link>
      <pubDate>Sun, 13 Sep 2026 16:20:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/cross-tenant-breakout-field-guide/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; can serve a directory full of sites out of one process. Point &lt;code&gt;sites_dir&lt;/code&gt; at&#xA;a folder and every subdirectory is a virtual host. The Host header decides which one you get. That&amp;rsquo;s how the PR preview&#xA;environment runs. Every pull request gets a subdomain, and the code behind it is whatever somebody pushed. One process&#xA;holding many tenants means ePHPm enforces every per-tenant boundary itself, in-process. There&amp;rsquo;s no container wall&#xA;between site A and site B unless you add one.&lt;/p&gt;</description>
    </item>
    <item>
      <title>We Disabled PHP&#39;s Stack Guard Ourselves: Containing Segfaults in a Single-Process PHP Server</title>
      <link>https://luth.io/blog/2026/09/php-stack-guard-segfault-containment/</link>
      <pubDate>Sun, 06 Sep 2026 15:05:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/php-stack-guard-segfault-containment/</guid>
      <description>&lt;p&gt;php-fpm has a property nobody thinks about until they leave it. When a worker segfaults, you lose one request. The&#xA;master forks a new child and life goes on. &lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; runs every tenant&amp;rsquo;s PHP as threads&#xA;inside one process. That&amp;rsquo;s where the memory and latency wins come from. It also means one tenant&amp;rsquo;s segfault takes down&#xA;every other tenant on the box.&lt;/p&gt;&#xA;&lt;p&gt;This is the story of closing that gap in four steps over about two weeks. The last step turned out to be a bug we&amp;rsquo;d&#xA;put there ourselves. It&amp;rsquo;s also the payoff for the thread pool work in&#xA;&lt;a href=&#34;https://luth.io/blog/2026/09/own-your-php-thread-pool/&#34;&gt;the previous post&lt;/a&gt;. Everything below that actually shipped depends on ePHPm&#xA;owning its own PHP threads.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Clustered ACME in Production: Three Bugs That Took TLS Down</title>
      <link>https://luth.io/blog/2026/09/clustered-acme-three-bugs/</link>
      <pubDate>Wed, 02 Sep 2026 19:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/09/clustered-acme-three-bugs/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; gets its own certificates from Let&amp;rsquo;s Encrypt. In a cluster only one node should&#xA;be talking to the CA. The nodes elect an ACME leader over the shared KV store. The leader orders the cert, and everybody&#xA;else installs it from KV. That all had unit tests and had worked on single nodes for months. Then I tried to move&#xA;wildcard TLS termination for our preview environment off a separate proxy and onto the 3-node cluster itself. In about&#xA;two days it found three separate bugs that each took TLS down. None of them showed up in a unit test. All of them are&#xA;the kind of thing you only learn by putting the feature on real machines.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Per-Tenant Network Policy in One Process: ePHPm&#39;s eBPF Thread Tags</title>
      <link>https://luth.io/blog/2026/08/ephpm-ebpf-per-vhost-network-policy/</link>
      <pubDate>Fri, 28 Aug 2026 20:40:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/ephpm-ebpf-per-vhost-network-policy/</guid>
      <description>&lt;p&gt;In multi-tenant mode &lt;a href=&#34;https://github.com/ephpm/ephpm&#34;&gt;ePHPm&lt;/a&gt; serves every site in &lt;code&gt;sites_dir&lt;/code&gt; from one process. Every&#xA;tenant&amp;rsquo;s PHP runs as the same OS user on the same pool of ZTS threads. A thread that just served &lt;code&gt;blog.example&lt;/code&gt; will&#xA;serve &lt;code&gt;shop.example&lt;/code&gt; a few milliseconds later. That&amp;rsquo;s the density win. It also means the kernel has no idea which&#xA;tenant is behind a given &lt;code&gt;connect()&lt;/code&gt;. As far as Linux is concerned it&amp;rsquo;s all &lt;code&gt;ephpm-web&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Most of the isolation work in ePHPm happens above the kernel. That covers &lt;code&gt;open_basedir&lt;/code&gt;, the function denylist,&#xA;per-site databases and KV keyspaces. Network is the one place where that isn&amp;rsquo;t enough. This week we brought eBPF in&#xA;to give the kernel a per-tenant identity. It went from a roadmap doc on Wednesday morning to merged that evening&#xA;(&lt;a href=&#34;https://github.com/ephpm/ephpm/pull/413&#34;&gt;#413&lt;/a&gt;, aimed at v0.8.1). v0.8.1 never got a release because its Linux&#xA;legs failed to link. v0.8.2 shipped with the BPF object silently stubbed out. v0.8.3 was the first release that&#xA;carried it. This post covers what it enforces and what it costs. It also covers what broke on the way out the door&#xA;and what it doesn&amp;rsquo;t do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Security and Performance Hardening of a Rust Database Proxy</title>
      <link>https://luth.io/blog/2026/08/hardening-rust-database-proxy/</link>
      <pubDate>Thu, 27 Aug 2026 20:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/hardening-rust-database-proxy/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/ephpm/litewire&#34;&gt;litewire&lt;/a&gt; is the piece of ePHPm that lets PHP apps talk MySQL to a SQLite file. I&#xA;wrote about &lt;a href=&#34;https://luth.io/blog/2026/07/sqlite-production-database-protocol-translation/&#34;&gt;how it works&lt;/a&gt; and about &lt;a href=&#34;https://luth.io/blog/2026/08/faking-mysql-quirks-wordpress/&#34;&gt;the MySQL quirks&#xA;WordPress depends on&lt;/a&gt;. This one is the less visible half of August:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;an audit pass on litewire&lt;/li&gt;&#xA;&lt;li&gt;a multi-tenant mode that turned a database proxy into a security boundary&lt;/li&gt;&#xA;&lt;li&gt;a performance regression I shipped and then had to go find&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It&amp;rsquo;s written in Rust. Memory safety is supposed to be the part I don&amp;rsquo;t have to think about, and it mostly is. The&#xA;use-after-free in this story was in a dependency. The worst bug wasn&amp;rsquo;t a memory bug at all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My iptables Rule Matched 0 Packets in 9.8 GB</title>
      <link>https://luth.io/blog/2026/08/iptables-rule-zero-packets/</link>
      <pubDate>Wed, 26 Aug 2026 20:30:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/iptables-rule-zero-packets/</guid>
      <description>&lt;p&gt;After a week of Windows firewall rules that &lt;a href=&#34;https://luth.io/blog/2026/08/windows-container-egress-firewall/&#34;&gt;listed fine and enforced nothing&lt;/a&gt;,&#xA;I went back to the Linux side of &lt;a href=&#34;https://github.com/ephpm/ephemerd&#34;&gt;ephemerd&lt;/a&gt; feeling pretty good about it. iptables is&#xA;the boring, well-understood one. Then I looked at the packet counters on a live node. I found a rule that had never&#xA;matched a packet in its life. That node had pushed 9.8 GB through the same chain.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-rules-i-thought-i-had&#34;&gt;The rules I thought I had&lt;/h3&gt;&#xA;&lt;p&gt;Job containers sit on a CNI bridge, &lt;code&gt;10.88.0.0/16&lt;/code&gt;, with the host on &lt;code&gt;10.88.0.1&lt;/code&gt;. ephemerd puts its egress policy in its&#xA;own chain, &lt;code&gt;EPHEMERD-FORWARD&lt;/code&gt;. &lt;code&gt;FORWARD&lt;/code&gt; jumps to it for anything to or from the container subnet. From a live node:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Five Ways to Not Firewall a Windows Container (and the One That Works)</title>
      <link>https://luth.io/blog/2026/08/windows-container-egress-firewall/</link>
      <pubDate>Sat, 22 Aug 2026 19:40:00 -0700</pubDate>
      <guid>https://luth.io/blog/2026/08/windows-container-egress-firewall/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://luth.io/blog/2026/08/ephemerd-one-daemon-every-os/&#34;&gt;ephemerd&lt;/a&gt; runs CI jobs from pull requests. One of the rules is that a job can&#xA;reach the internet but not my LAN. On Linux that&amp;rsquo;s a few iptables rules in the &lt;code&gt;FORWARD&lt;/code&gt; path, and I didn&amp;rsquo;t think about it&#xA;much. On Windows I spent about a week finding out how many ways there are to write a firewall rule that Windows accepts,&#xA;lists and never applies.&lt;/p&gt;&#xA;&lt;p&gt;The setup is Windows Server 2025 (build 26100) with job containers running under Hyper-V isolation. They sit on the default&#xA;HNS NAT network that every Windows container tutorial uses. In ephemerd&amp;rsquo;s case that&amp;rsquo;s &lt;code&gt;10.88.0.0/16&lt;/code&gt; with gateway&#xA;&lt;code&gt;10.88.0.1&lt;/code&gt;. The target is the same as Linux. Block &lt;code&gt;10.0.0.0/8&lt;/code&gt;, &lt;code&gt;172.16.0.0/12&lt;/code&gt;, &lt;code&gt;192.168.0.0/16&lt;/code&gt; and &lt;code&gt;169.254.0.0/16&lt;/code&gt;,&#xA;and allow everything else.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
