<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Kernel on ben&#39;s blog</title>
    <link>https://benjamin.mendes.im/tags/kernel/</link>
    <description>Recent content in Kernel on ben&#39;s blog</description>
    <generator>Hugo -- 0.152.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 03 May 2026 23:14:16 +0100</lastBuildDate>
    <atom:link href="https://benjamin.mendes.im/tags/kernel/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>732 Bytes That Root Every Linux Box Since 2017</title>
      <link>https://benjamin.mendes.im/posts/2026/copy-fail-linux-exploit/</link>
      <pubDate>Sun, 03 May 2026 23:14:16 +0100</pubDate>
      <guid>https://benjamin.mendes.im/posts/2026/copy-fail-linux-exploit/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://benjamin.mendes.im/i1/1777846126628-copy-fail-exploit.svg&#34;&gt;&lt;/p&gt;
&lt;p&gt;Tiago has a great write-up of a Linux kernel exploit, CVE-2026-31431, that I think is one of the most beautiful pieces of security work I&amp;rsquo;ve read in a long time. It&amp;rsquo;s a 732-byte Python script that gives an unprivileged local user root access on basically every Linux distribution shipped since 2017.&lt;/p&gt;
&lt;p&gt;What makes it special isn&amp;rsquo;t the size, it&amp;rsquo;s how it works. There&amp;rsquo;s no buffer overflow, no use-after-free, no memory corruption tricks. The bug is a logic flaw in the kernel&amp;rsquo;s AF_ALG crypto socket code. The reason this is so elegant is that all the standard kernel defences just don&amp;rsquo;t apply. Most of them  are designed to stop memory corruption attacks. This isn&amp;rsquo;t one. It&amp;rsquo;s the kernel doing exactly what it was told to do, with side effects nobody noticed for almost a decade.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img loading="lazy" src="/i1/1777846126628-copy-fail-exploit.svg"></p>
<p>Tiago has a great write-up of a Linux kernel exploit, CVE-2026-31431, that I think is one of the most beautiful pieces of security work I&rsquo;ve read in a long time. It&rsquo;s a 732-byte Python script that gives an unprivileged local user root access on basically every Linux distribution shipped since 2017.</p>
<p>What makes it special isn&rsquo;t the size, it&rsquo;s how it works. There&rsquo;s no buffer overflow, no use-after-free, no memory corruption tricks. The bug is a logic flaw in the kernel&rsquo;s AF_ALG crypto socket code. The reason this is so elegant is that all the standard kernel defences just don&rsquo;t apply. Most of them  are designed to stop memory corruption attacks. This isn&rsquo;t one. It&rsquo;s the kernel doing exactly what it was told to do, with side effects nobody noticed for almost a decade.</p>
<p>You don&rsquo;t see exploits like this very often. Most kernel CVEs are race conditions or memory bugs, the kind that get harder to weaponise as defences improve. This one is just careful reading of the source and noticing that a clever optimisation in 2017 quietly opened a door that&rsquo;s been there ever since. Patches dropped April 30, with seccomp or module blocklisting as a temporary mitigation. If you run Linux anywhere serious, patch.</p>
<p><a href="https://tiago.mendes.im/posts/copy-fail/">Link to the article</a></p>
]]></content:encoded>
    </item>
  </channel>
</rss>
