<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Security &#8211; OSLogs</title>
	<atom:link href="https://oslogs.com/tag/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>https://oslogs.com</link>
	<description>Logging Operating System Updates</description>
	<lastBuildDate>Mon, 04 May 2026 12:20:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://oslogs.com/wp-content/uploads/2023/05/favicon.png</url>
	<title>Linux Security &#8211; OSLogs</title>
	<link>https://oslogs.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Linux Copy Fail bug and local privilege escalation (LPE) vulnerabilities</title>
		<link>https://oslogs.com/2026/05/04/linux-copy-fail-bug-and-local-privilege-escalation-lpe-vulnerabilities/</link>
					<comments>https://oslogs.com/2026/05/04/linux-copy-fail-bug-and-local-privilege-escalation-lpe-vulnerabilities/#respond</comments>
		
		<dc:creator><![CDATA[Nishant Kaushal]]></dc:creator>
		<pubDate>Mon, 04 May 2026 12:20:46 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Copy Fail]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Vulnerabilities]]></category>
		<category><![CDATA[Local Privilege Escalation]]></category>
		<guid isPermaLink="false">https://oslogs.com/?p=8883</guid>

					<description><![CDATA[The Linux kernel community is currently wrestling with one of the most significant Local Privilege Escalation (LPE) vulnerabilities in recent memory. Dubbed Copy Fail and tracked as CVE-2026-31431, this flaw allows a local user with zero special permissions to gain full root access in seconds. If you&#8217;re getting a sense of déjà vu, it’s probably [&#8230;]]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div>
<p>The Linux kernel community is currently wrestling with one of the most significant <strong>Local Privilege Escalation (LPE)</strong> vulnerabilities in recent memory. Dubbed <strong>Copy Fail</strong> and tracked as <strong><a href="https://nvd.nist.gov/vuln/detail/CVE-2026-31431" target="_blank" rel="noopener">CVE-2026-31431</a></strong>, this flaw allows a local user with zero special permissions to gain full root access in seconds.</p>



<p>If you&#8217;re getting a sense of déjà vu, it’s probably because this feels remarkably like the infamous <strong>Dirty Pipe</strong> <strong>CVE-2022-0847</strong>. However, <strong><a href="https://cert.europa.eu/publications/security-advisories/2026-005/#:~:text=By%20chaining%20an%20AF_ALG%20socket,a%20root%20shell%20%5B1%5D." target="_blank" rel="noopener">Copy Fail</a></strong> is arguably more dangerous because it exploits a performance optimization that has been sitting quietly in the kernel since 2017, affecting nearly every major distribution in the wild.</p>



<h2 class="wp-block-heading">The Technical Gory Details: How &#8220;Copy Fail&#8221; Works</h2>



<p>At its heart, <strong>CVE-2026-31431</strong> is a <strong>logic flaw within the algif_aead module</strong>, which is part of the AF_ALG userspace cryptographic API. The vulnerability was introduced when the kernel team implemented an &#8220;in-place&#8221; optimization to speed up crypto operations. In a standard cryptographic operation, you have a source buffer and a destination buffer. To save memory and cycles, the optimization allowed the kernel to use the same memory area for both (i.e., $req->src == req->dst$). The problem arises when this is combined with the splice() system call.</p>



<p><strong>The Attack Chain</strong></p>



<p>An attacker can chain three specific primitives to achieve escalation:</p>



<ol class="wp-block-list">
<li><strong>The Socket Setup:</strong> Open an AF_ALG socket for an Authenticated Encryption with Associated Data (AEAD) algorithm, such as authencesn(hmac(sha256), cbc(aes)).</li>



<li><strong>The Splice Trap:</strong> Use splice() to move data from a read-only file (like /usr/bin/su or /etc/passwd) into the socket. Because splice() works by moving pages rather than copying data, the socket&#8217;s destination scatterlist now points directly to the kernel’s page cache—the in-memory <strong>cached</strong> version of that file.</li>



<li><strong>The Overwrite:</strong> When the AEAD operation executes, it incorrectly performs a 4-byte <strong>scratch</strong> write of a sequence number (specifically the $seqno_lo$ field) into the destination.</li>
</ol>



<p>Because the destination is the page cache, the kernel effectively writes those four bytes directly into the memory of a privileged binary. The attacker doesn&#8217;t need write permissions to the file on disk; they are only corrupting the version the kernel is currently holding in RAM.</p>



<p><strong>Note:</strong> The exploit is entirely deterministic. It doesn&#8217;t rely on winning a race condition or spraying the heap. It is a surgical, four-byte strike that can turn a <strong>reject access</strong> instruction in a binary into a <strong>grant access</strong> one.</p>



<h2 class="wp-block-heading">The Harm: Why &#8220;Copy Fail&#8221; is a Nightmare</h2>



<p>The immediate risk is a total compromise of the host system. A 732-byte Python script is all it takes to trigger the vulnerability.</p>



<ol class="wp-block-list">
<li>Root Escalation: An unprivileged user can corrupt the memory of /usr/bin/su to ignore password requirements or flip their own UID to 0 in the cached version of /etc/passwd.</li>



<li>Container Escape: Since the page cache is often shared between the host and its containers for performance, an attacker inside a restricted container can corrupt a host binary, facilitating a full container breakout.</li>



<li>Multi-tenant Compromise: In cloud environments or shared hosting, one compromised account can lead to the compromise of the entire physical node and every other tenant on it.</li>
</ol>



<h2 class="wp-block-heading">Affected Systems and Kernel Versions</h2>



<p>The vulnerability is widespread because it stems from a commit (specifically 72548b093ee3) introduced in Linux Kernel 4.14 in July 2017.</p>



<ul class="wp-block-list">
<li><strong>Ubuntu:</strong> 18.04, 20.04, 22.04, 24.04 LTS</li>



<li><strong>RHEL / Rocky / Alma:</strong> 8.x, 9.x, 10.1</li>



<li><strong>Debian:</strong> 10 (Buster), 11 (Bullseye), 12 (Bookworm)</li>



<li><strong>Amazon Linux:</strong> AL2, AL2023</li>



<li><strong>SUSE / openSUSE:</strong> SLE 15, SUSE 16</li>
</ul>



<p><strong>Vulnerable Kernel Range:</strong> 4.14 through 7.0-rc, all 6.18.x prior to 6.18.22, and 6.19.x prior to 6.19.12.</p>



<h2 class="wp-block-heading">The Fix: Has it Been Released?</h2>



<p>The fix involves a series of upstream commits that revert the unsafe in-place optimization and improve error handling during failed copy operations.</p>



<p><strong>Upstream Fixes:</strong> Released in kernels 7.0, 6.19.12, and 6.18.22.</p>



<p><strong>Distribution Status:</strong> Most major players (Ubuntu, Debian, Amazon) released patches between April 30 and May 2, 2026. However, some enterprise-grade distributions (like RHEL 8 and 9) may still have the fix in &#8220;Testing&#8221; or &#8220;Beta&#8221; repositories (e.g., cl7h_beta for CloudLinux).</p>



<h3 class="wp-block-heading">How to Apply the Fix</h3>



<p><strong>For Ubuntu/Debian:</strong></p>



<pre class="wp-block-code"><code>sudo apt update &amp;&amp; sudo apt upgrade<br>sudo reboot</code></pre>



<p><strong>For RHEL/AlmaLinux/Rocky:</strong></p>



<pre class="wp-block-code"><code>sudo dnf clean metadata &amp;&amp; sudo dnf update kernel<br>sudo reboot</code></pre>



<h2 class="wp-block-heading">Detection: How to Tell if You&#8217;re Vulnerable or Infected</h2>



<ol class="wp-block-list">
<li>Identifying Vulnerability
<ul class="wp-block-list">
<li>The quickest way is to check your running kernel version:</li>



<li>uname -r</li>



<li>Compare your version against your vendor’s advisory. If you are running anything between 4.14 and 6.19.11, and haven&#8217;t updated in the last 72 hours, you are likely at risk.</li>
</ul>
</li>



<li>The &#8220;Copy Fail&#8221; Detector
<ul class="wp-block-list">
<li>Security researchers at Theori and CloudLinux have released a non-destructive detector script. Unlike the exploit, it creates a temporary &#8220;sentinel&#8221; file and attempts to overwrite it rather than a system binary. If the sentinel file&#8217;s memory is modified, the system is confirmed vulnerable.</li>
</ul>
</li>



<li>Runtime Detection (Falco/EDR)
<ul class="wp-block-list">
<li>If you cannot patch immediately, you can monitor for the &#8220;first step&#8221; of the exploit: the creation of an AF_ALG socket using the SOCK_SEQPACKET type. While some legitimate tools (like cryptsetup or systemd-cryptsetup) use these sockets, they are rare for standard user processes.</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading">Mitigations (The &#8220;Band-Aid&#8221; Solutions)</h2>



<p>If you are in a production environment where a reboot is impossible right now, you have a few options—but be careful, as some common advice is currently wrong.</p>



<ol class="wp-block-list">
<li><strong>The &#8220;Initcall&#8221; Blacklist (Effective):</strong> You can block the vulnerable module at boot by adding the following to your GRUB configuration:
<ul class="wp-block-list">
<li>initcall_blacklist=algif_aead_init</li>



<li>Note: This requires a reboot to take effect, which defeats the purpose for some, but it prevents the vulnerability from existing upon restart.</li>
</ul>
</li>



<li><strong>The Modprobe Trap (Ineffective on many systems):</strong>
<ul class="wp-block-list">
<li>Many guides suggest running rmmod algif_aead or blacklisting it in /etc/modprobe.d/. This often does not work. On many modern distributions (especially the RHEL family), algif_aead is built directly into the kernel (CONFIG_CRYPTO_USER_API_AEAD=y), meaning it cannot be removed or blocked via modprobe.</li>
</ul>
</li>



<li><strong>Seccomp/AppArmor:</strong>
<ul class="wp-block-list">
<li>Restrict the socket system call for unprivileged users, specifically blocking the AF_ALG protocol family if your applications don&#8217;t require it.</li>
</ul>
</li>
</ol>



<h2 class="wp-block-heading">Final Thoughts</h2>



<p>The disclosure of CVE-2026-31431 has been messy. Because the proof-of-concept was released before all enterprise distributions had stable patches ready, there was a 48-hour &#8220;free-for-all&#8221; window where systems were defenseless.</p>



<p>&#8220;Copy Fail&#8221; serves as a stark reminder that as we optimize the kernel for the speeds required by 2026 hardware, we often walk a tightrope between performance and security boundaries. If your Linux servers haven&#8217;t been touched in the last few days, now is the time to verify your kernel version.</p>



<p><strong>Have you checked your <em>uname -r</em> today?</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://oslogs.com/2026/05/04/linux-copy-fail-bug-and-local-privilege-escalation-lpe-vulnerabilities/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
