Threat Response - CVE-2026-31431 "Copy Fail" - Critical Linux Kernel Privilege Escalation
A critical vulnerability in the Linux kernel allows any unprivileged local user to gain root privileges using a simple 732-byte script. This affects all major Linux distributions deployed since 2017, including systems you may be running. Immediate patching is required.
Description
CVE-2026-31431, branded "Copy Fail," is a logic flaw in the Linux kernel's cryptographic subsystem. The vulnerability allows an unprivileged local user to write 4 bytes into the memory cache of any readable file on the system. By targeting setuid binaries like /usr/bin/su, an attacker can inject malicious code and execute it with root privileges.
The vulnerability exists in the authencesn cryptographic template when combined with the AF_ALG socket interface and the splice() system call. When these components interact, the kernel incorrectly allows write operations into memory pages that should be read-only, corrupting the cached version of system files.
What makes this vulnerability particularly dangerous is that the corruption only affects the in-memory cache, the actual files on disk remain unchanged. This means standard file integrity monitoring tools that check disk-based checksums will not detect the compromise.
The same vulnerability also crosses container boundaries because all containers on a system share the same kernel memory cache. This makes it both a privilege escalation vulnerability and a container escape mechanism.
Impact
We estimate the impact of this vulnerability as high.
If exploited, an attacker with basic user access to any Linux system can:
- Gain complete root (administrator) access to the system
- Execute arbitrary commands with full system privileges
- Install persistent backdoors or malware
- Access, modify, or delete any data on the system
- Escape from containers to compromise the underlying host system
- Pivot to other systems on the network using elevated privileges
The vulnerability affects virtually all Linux distributions shipped since 2017, including:
- Ubuntu
- Red Hat Enterprise Linux / CentOS / Rocky Linux
- Amazon Linux
- SUSE Linux Enterprise
- Debian
Both physical servers and cloud instances are vulnerable. Container platforms like Docker and Kubernetes are particularly at risk due to the container escape capability.
Risk
We estimate the risk of this vulnerability as high.
The risk is exceptionally high because:
Exploitation is trivial: A working exploit requiring only 732 bytes of Python code is publicly available. The exploit works reliably without requiring any complex timing, race conditions, or multiple attempts. It works identically across all tested Linux distributions without modification.
Attack prerequisites are minimal: Any user account on a vulnerable Linux system can exploit this, including:
- Low-privilege service accounts
- Compromised web application users
- Users who gained initial access through phishing or other means
The vulnerability is widespread: Nearly every Linux system deployed in the last 9 years is affected. This includes web servers, database servers, container hosts, cloud instances, and development environments.
Detection is difficult: Because the attack modifies only in-memory data and leaves disk files unchanged, traditional file integrity monitoring will not detect the compromise. The attack also operates through legitimate kernel interfaces, making it harder to distinguish from normal system activity.
Active exploitation is expected: Given the public availability of exploit code and the universal nature of the vulnerability, widespread exploitation attempts are inevitable and likely already underway.
Mitigation
Primary mitigation - Apply kernel updates immediately:
All major Linux distributions have released or are releasing patched kernel versions. Update your systems using your distribution's standard package manager.
After updating, reboot your systems to activate the new kernel.
Temporary workaround (if immediate patching is not possible):
If you cannot immediately patch, you can temporarily block the vulnerable code path by preventing the algif_aead kernel module from loading:
bash echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-
Important: This workaround may break IPsec VPN functionality or other software that uses kernel-based cryptography. Test in your environment and plan for proper patching as soon as possible.
What should you do?
Immediate actions (today):
1. Identify all Linux systems in your environment, including:- Physical and virtual servers
- Cloud instances (AWS, Azure, GCP)
- Container host systems running Docker or Kubernetes
- Development and test environments
- External-facing Linux systems (web servers, VPN endpoints, bastion hosts)
- Container host systems and Kubernetes nodes
- Multi-tenant systems where multiple users have accounts
- Internal production servers
- Development and test systems
4. Schedule maintenance windows to reboot systems and activate the patched kernels
5. For systems that cannot be immediately patched, apply the temporary workaround to block the vulnerable module
Within 7 days:
6. Verify all systems are patched by checking kernel versions include the fix (commit a664bf3d603d)7. Review security logs for unusual activity around the time of public disclosure (April 29, 2026 onward), particularly:
- Unexpected privilege escalations
- Unusual activity from low-privilege accounts
- Unexpected modifications to setuid binaries
- Container escape attempts
Ongoing:
9.Maintain regular kernel patching schedules to prevent similar exposure windows in the future10. Consider implementing additional security controls such as:
- SELinux or AppArmor mandatory access controls
- Container security policies that limit system call access
- Enhanced monitoring for privilege escalation attempts
What will Northwave do?
Vulnerability Management customers will be informed in case vulnerable systems are detected in their infrastructure.
We will monitor any developments regarding this vulnerability. If new critical information about this threat arises we will reach out to you. You can call us by phone or send us an email if you would like additional information.
Phone number: +31 (0)30-303 1244 (during business hours)
E-mail: soc@northwave-cybersecurity.
Do you have an incident right now? Call our Incident Response Team: 00800 1744 0000
Disclaimer applies, see below.
Sources
- Xint Code Research Advisory: https://xint.io/blog/copy-
fail-linux-distributions - Linux Kernel Fix: https://github.com/torvalds/
linux/commit/ a664bf3d603dc3bdcf9ae47cc21e0d aec706d7a5 - CVE Entry: CVE-2026-31431
Een kritieke kwetsbaarheid in de Linux-kernel maakt het mogelijk voor elke lokale gebruiker zonder rechten om rootrechten te verkrijgen met een eenvoudig script van 732 bytes. Dit treft alle grote Linux-distributies die sinds 2017 zijn uitgerold, inclusief systemen die u mogelijk gebruikt. Direct patchen is noodzakelijk.
Beschrijving
CVE-2026-31431, bekend onder de naam “Copy Fail”, is een fout in het cryptografische subsysteem van de Linux-kernel. Door deze kwetsbaarheid kan een lokale gebruiker zonder rechten 4 bytes schrijven naar de geheugencache van elk leesbaar bestand op het systeem. Door zich te richten op setuid-binaries zoals /usr/bin/su, kan een aanvaller kwaadaardige code injecteren en deze uitvoeren met rootrechten.
De kwetsbaarheid zit in de authencesn cryptografische template in combinatie met de AF_ALG socket-interface en de splice() system call. Wanneer deze onderdelen samen worden gebruikt, staat de kernel onterecht schrijfbewerkingen toe op geheugenpagina’s die alleen-lezen zouden moeten zijn. Hierdoor raakt de gecachte versie van systeembestanden beschadigd.
Wat deze kwetsbaarheid extra gevaarlijk maakt, is dat de corruptie alleen de in-memory cache raakt. De bestanden op schijf blijven ongewijzigd. Standaard tools voor bestandsintegriteit die controles uitvoeren op schijf, detecteren deze aanval daarom niet.
Dezelfde kwetsbaarheid doorbreekt ook containerisolatie, omdat alle containers op een systeem dezelfde kernelgeheugencache delen. Dit maakt het zowel een privilege-escalatie als een container-escape.
Impact
Wij schatten de impact van deze kwetsbaarheid als hoog.
Bij misbruik kan een aanvaller met basisgebruikerstoegang tot een Linux-systeem:
- Volledige root- (beheerder) toegang krijgen
- Willekeurige commando’s uitvoeren met volledige systeemrechten
- Persistente backdoors of malware installeren
- Alle data op het systeem inzien, aanpassen of verwijderen
- Uit containers ontsnappen en het onderliggende hostsysteem compromitteren
- Zich lateraal verplaatsen naar andere systemen in het netwerk
De kwetsbaarheid treft vrijwel alle Linux-distributies die sinds 2017 zijn geleverd, waaronder:
- Ubuntu
- Red Hat Enterprise Linux / CentOS / Rocky Linux
- Amazon Linux
- SUSE Linux Enterprise
- Debian
Zowel fysieke servers als cloud-instances zijn kwetsbaar. Containerplatformen zoals Docker en Kubernetes lopen extra risico door de container-escape mogelijkheid.
Risico
Wij schatten het risico van deze kwetsbaarheid als hoog.
Het risico is uitzonderlijk hoog omdat:
Exploitatie eenvoudig is. Er is publiek beschikbare exploitcode van 732 bytes in Python. Deze werkt betrouwbaar, zonder complexe timing, race conditions of meerdere pogingen, en functioneert identiek op alle geteste distributies.
De aanvalsdrempel laag is. Elke gebruikersaccount op een kwetsbaar systeem kan dit misbruiken, waaronder:
- Laag-geprivilegieerde service-accounts
- Gebruikers van gecompromitteerde webapplicaties
- Accounts verkregen via phishing of vergelijkbare aanvallen
De kwetsbaarheid wijdverbreid is. Bijna elk Linux-systeem van de afgelopen 9 jaar is geraakt, inclusief webservers, databaseservers, containerhosts, cloud-instances en ontwikkelomgevingen.
Detectie moeilijk is. Omdat alleen het geheugen wordt aangepast en niet de schijf, detecteren traditionele integriteitscontroles dit niet. De aanval gebruikt bovendien legitieme kernel-interfaces.
Actieve misbruikpogingen worden verwacht. Door de publieke exploit en het universele karakter is grootschalig misbruik waarschijnlijk en mogelijk al gaande.
Mitigatie
Primaire maatregel – Direct kernel-updates toepassen
Alle grote Linux-distributies hebben gepatchte kernelversies uitgebracht of zijn hiermee bezig. Werk uw systemen bij via de standaard package manager van uw distributie.
Na het updaten moet u de systemen herstarten om de nieuwe kernel te activeren.
Tijdelijke workaround (als direct patchen niet mogelijk is)
U kunt tijdelijk het kwetsbare pad blokkeren door te voorkomen dat de algif_aead kernelmodule wordt geladen:
bash echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-
Belangrijk: deze workaround kan IPsec-VPN-functionaliteit of andere software die kernel-cryptografie gebruikt verstoren. Test dit in uw omgeving en plan zo snel mogelijk definitieve patching.
Wat moet u doen?
Directe acties (vandaag)
1. Breng alle Linux-systemen in kaart, inclusief:- Fysieke en virtuele servers
- Cloud-instances (AWS, Azure, GCP)
- Containerhosts met Docker of Kubernetes
- Ontwikkel- en testomgevingen
- Extern toegankelijke systemen (webservers, VPN-endpoints, bastion hosts)
- Containerhosts en Kubernetes-nodes
- Multi-tenant systemen met meerdere gebruikers
- Interne productieservers
- Ontwikkel- en testomgevingen
4. Plan onderhoudsmomenten om systemen te herstarten
5. Pas waar nodig de tijdelijke workaround toe
Binnen 7 dagen
6. Controleer of alle systemen zijn gepatcht en de fix bevatten (commit a664bf3d603d)7. Controleer security-logs vanaf 29 april 2026, met focus op:
- Onverwachte privilege-escalaties
- Ongebruikelijke activiteit van laag-geprivilegieerde accounts
- Onverwachte wijzigingen aan setuid-binaries
- Pogingen tot container-escape
Doorlopend
9. Houd een vaste kernel-patchcyclus aan10. Overweeg aanvullende maatregelen zoals:
- SELinux of AppArmor
- Container policies die system calls beperken
- Extra monitoring op privilege-escalatiepogingen
Wat zal Northwave doen?
Klanten van Vulnerability Management worden geïnformeerd als kwetsbare systemen in hun infrastructuur worden gedetecteerd.
Wij volgen verdere ontwikkelingen rondom deze kwetsbaarheid. Bij nieuwe kritieke informatie nemen wij contact met u op. U kunt ons telefonisch of per e-mail benaderen voor aanvullende vragen.
Telefoon: +31 (0)30-303 1244 (kantooruren)
E-mail: soc@northwave-cybersecurity.
Heeft u nu een incident? Bel ons Incident Response Team: 00800 1744 0000
Disclaimer van toepassing, zie onderaan.
Bronnen
- Xint Code Research Advisory: https://xint.io/blog/copy-
fail-linux-distributions - Linux Kernel Fix: https://github.com/torvalds/
linux/commit/ a664bf3d603dc3bdcf9ae47cc21e0d aec706d7a5 - CVE Entry: CVE-2026-31431

