{"id":26511,"date":"2026-04-30T15:43:29","date_gmt":"2026-04-30T14:43:29","guid":{"rendered":"https:\/\/www.heartinternet.uk\/blog\/?p=26511"},"modified":"2026-04-30T15:43:29","modified_gmt":"2026-04-30T14:43:29","slug":"copy-fail-linux-vulnerability","status":"publish","type":"post","link":"https:\/\/www.heartinternet.uk\/blog\/copy-fail-linux-vulnerability\/","title":{"rendered":"Copy Fail Linux Vulnerability (CVE-2026-31431)"},"content":{"rendered":"<p>On 29 April 2026, security researchers at Theori (Xint Code) publicly disclosed CVE-2026-31431, known as \u201cCopy Fail.\u201d It is a local privilege escalation flaw in the Linux kernel\u2019s AF_ALG cryptographic interface. Any unprivileged local user, including a compromised web application running as a low-privilege user such as www-data, apache, or a cPanel customer account, can escalate to root within seconds. The vulnerability has existed in mainstream Linux kernels since 2017 and a working public exploit is already in circulation.<\/p>\n<h2>Who is affected?<\/h2>\n<h3>Not affected by this vulnerability<\/h3>\n<ul>\n<li>CentOS 6 and CentOS 7: NOT affected. No action required.<\/li>\n<li>AlmaLinux, Rocky Linux, RHEL, CloudLinux (versions 8 and 9): Affected.<\/li>\n<li>Ubuntu and Debian (all currently supported releases): Affected.<\/li>\n<\/ul>\n<p>If you are unsure which distribution you are running, the following command will tell you:<\/p>\n<pre><code>cat \/etc\/os-release<\/code><\/pre>\n<h2>Step 1: Confirm whether your kernel is vulnerable<\/h2>\n<p>Run this command as root:<\/p>\n<pre><code>grep CRYPTO_USER_API_AEAD \/boot\/config-$(uname -r)<\/code><\/pre>\n<ul>\n<li>No output, or the file does not exist: your kernel is not affected. No further action required.<\/li>\n<li>Output ending in &#8220;=m&#8221; &#8211; typical for Ubuntu and Debian: affected, follow Path B below.<\/li>\n<li>Output ending in &#8220;=y&#8221; &#8211; typical for AlmaLinux, Rocky, RHEL, CloudLinux: affected, follow Path A below.<\/li>\n<\/ul>\n<h2>Step 2a: Path A &#8211; AlmaLinux \/ Rocky \/ RHEL \/ CloudLinux<\/h2>\n<p>On these distributions the vulnerable code is compiled directly into the kernel, so the standard module-blacklist approach will silently fail and leave your server vulnerable. Use the following kernel boot parameter instead, which prevents the vulnerable subsystem from initialising at boot:<\/p>\n<pre><code>grubby --update-kernel=ALL --args=\"initcall_blacklist=algif_aead_init\"\r\nreboot<\/code><\/pre>\n<p>A reboot is required for the change to take effect.<\/p>\n<h2>Step 2b: Path B &#8211; Ubuntu \/ Debian<\/h2>\n<p>On these distributions the vulnerable code is a loadable module and can be disabled with:<\/p>\n<pre><code>echo \"install algif_aead \/bin\/false\" &gt; \/etc\/modprobe.d\/disable-algif.conf\r\nrmmod algif_aead 2&gt;\/dev\/null || true<\/code><\/pre>\n<p>A reboot is not strictly required but is recommended to ensure the configuration is loaded cleanly on next boot.<\/p>\n<h2>Step 3: Verify the mitigation has taken effect<\/h2>\n<p>As a non-root user, run the following test. It attempts to bind an AF_ALG AEAD socket, the operation an attacker would perform, and reports whether the kernel still permits it:<\/p>\n<pre><code>perl -e '\r\nuse Socket;\r\nsocket(S, 38, 5, 0) or die \"socket: $!\";\r\nmy $addr = pack(\"S a14 L L a64\", 38, \"aead\", 0, 0, \"authenc(hmac(sha256),cbc(aes))\");\r\nbind(S, $addr) or die \"bind: $!\";\r\nprint \"bind ok\\n\";\r\n'<\/code><\/pre>\n<ul>\n<li>Output <code>bind ok<\/code> If you get this output, your server is still vulnerable. For Path A, re-check Step 2 and ensure you have rebooted.\u00a0 For Path B, run <code>rmmod<\/code>.<\/li>\n<li>Output <code>bind: No such file or directory<\/code> If you get this output, the mitigation is working.<\/li>\n<\/ul>\n<h2>Step 4: Apply the official kernel patch when available<\/h2>\n<p>The mitigation above disables the AF_ALG authenticated-encryption interface. This is safe for the overwhelming majority of workloads, it is not used by SSH, OpenSSL, dm-crypt\/LUKS, IPsec, or kTLS,\u00a0but it should be considered a temporary measure. When your distribution publishes a kernel update incorporating upstream commit <code>a664bf3d603d<\/code>\u00a0please apply it and reboot:<\/p>\n<ul>\n<li>Ubuntu \/ Debian: <code>apt update &amp;&amp; apt upgrade &amp;&amp; reboot<\/code><\/li>\n<li>AlmaLinux \/ Rocky: <code>dnf update kernel &amp;&amp; reboot<\/code><\/li>\n<li>CloudLinux: a kernel update and a KernelCare live patch are in active development. Please monitor <a href=\"https:\/\/cloudlinux.statuspage.io\">https:\/\/cloudlinux.statuspage.io<\/a> for availability.<\/li>\n<\/ul>\n<p>Once the patched kernel is running, the temporary mitigation can be removed if you wish.<\/p>\n<h2>Need assistance?<\/h2>\n<p>If you would prefer a Heart Internet engineer to apply the mitigation on your server, please raise a ticket through your control panel and reference \u201cCVE-2026-31431\u201d, but please be aware that managed customers are being prioritised.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On 29 April 2026, security researchers at Theori (Xint Code) publicly disclosed CVE-2026-31431, known as \u201cCopy Fail.\u201d It is a local privilege escalation flaw in the Linux kernel\u2019s AF_ALG cryptographic&#8230;<\/p>\n","protected":false},"author":2,"featured_media":26240,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,164],"tags":[],"class_list":["post-26511","post","type-post","status-publish","format-standard","has-post-thumbnail","category-heart-internet","category-news"],"_links":{"self":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/26511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/comments?post=26511"}],"version-history":[{"count":6,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/26511\/revisions"}],"predecessor-version":[{"id":26525,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/26511\/revisions\/26525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media\/26240"}],"wp:attachment":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media?parent=26511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/categories?post=26511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/tags?post=26511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}