Skip to content

Commit 68823fe

Browse files
authored
Merge branch 'main' into feat/node-22
Signed-off-by: Kurt Garloff <kurt@garloff.de>
2 parents 3a9e4de + a91a8f5 commit 68823fe

4 files changed

Lines changed: 450 additions & 3 deletions

File tree

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22
1+
v22
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
---
2+
slug: kernel_local_root_exploits
3+
title: Linux Kernel local root exploits CVE-2026-31431, -43284, -43500
4+
authors: [garloff]
5+
tags: [security, linux, cve, copy.fail, dirtyfrag]
6+
---
7+
8+
## Linux root exploits (Local Privilege Escalation)
9+
10+
Unix is designed as a multi-user system. Different users have their own
11+
files and processes and can work without interference from others.
12+
Linux lives in that tradition. It has advanced the concept with namespaces
13+
where users can also have a private view on networking, process list, filesystems
14+
and other pieces that are traditionally shared (read-only) on a Unix system,
15+
also including some resource management to enhance performance isolation.
16+
17+
It is the operating system's kernel's job to keep the separation safe; in
18+
particular, normal users must not achieve the system administrator (root)
19+
privileges. Where the kernel fails to ensure this, we have a "local root"
20+
vulnerability, a Local Privilege Escalation (LPE).
21+
22+
The Linux kernel is a large and a complex beast. On one hand it has sophisticated
23+
mechanisms to get really good performance out of increasingly complex hardware.
24+
On the other hand, it comes with a huge variety of device drivers. From time to
25+
time, vulnerabilities are found, reported and fixed. The Linux kernel has several
26+
LPEs per year. Most of the time, they affect only a small fraction of users
27+
(typically by being located in a device driver or somewhat exotic feature)
28+
and often they are hard to exploit, needing to win a race condition with
29+
many attempts and sometimes causing crashes in trying (which may not go unnoticed).
30+
31+
We don't normally report about these LPEs. They get fixed by the upstream Linux kernel
32+
developers, shipped as stable updates by the maintainers and shipped to the end
33+
users via kernel updates from the Linux distributors.
34+
35+
## copy.fail and Dirty Frag
36+
37+
The currently highly visible Linux kernel issues [copy.fail](https://copy.fail/)
38+
and [Dirty Frag](https://github.com/V4bel/dirtyfrag) are both LPEs (local root
39+
vulnerabilities). The reason we report about them is that they both affect
40+
most Linux users (with kernels from the last 9 years) and are easy to exploit.
41+
42+
Like [Dirty Pipe](https://dirtypipe.cm4all.com/) and before
43+
[Dirty Cow](https://dirtycow.ninja/), both LPEs rely on improper protection
44+
of the page cache.
45+
The Linux kernel keeps contents from file systems in the page cache; when code
46+
gets executed, it is mapped into your virtual memory. When the memory page is
47+
accessed and not yet loaded into your physical memory, a page fault occurs and
48+
the relevant blocks are loaded from disk — or the access is denied and your
49+
program receives `SIGSEGV` and is terminated. Copying pages is costly and the
50+
kernel avoids it to achieve higher performance. If you write to a memory page,
51+
the kernel may receive a page fault on a read-only mapping (that it created to
52+
avoid copying) and only then do the copy to create a private writable copy.
53+
This approach is called copy-on-write (COW) and is common in modern operating
54+
systems. If a page from the page cache is changed in memory, it is also marked
55+
"dirty", so the kernel knows it needs to write the changes back to the file system.
56+
57+
In copy.fail, the `aead` crypto module did some cryptography in place, avoiding
58+
the need to allocate an extra buffer. Unfortunately, it requires 4 extra bytes
59+
under some conditions; normally aead is used by IPsec and that location is a
60+
designate place in a network buffer. However, a local attacker can make this
61+
write happen to a page cache page by using `splice`. This way, the copy of the
62+
`sudo` binary in the page cache can be overwritten, allowing to circumvent the
63+
safeguards there. The attacker can trivially become root — as the page is not
64+
dirtied, no trace of the corruption will be visible on the disk.
65+
[copy.fail](https://copy.fail/) has been assigned CVE-2026-31431.
66+
67+
In Dirty Frag, a network buffer that is split over several fragments is not
68+
properly handled and the fragmented buffer is not properly COW'ed. The AEAD
69+
crypto operation then again overwrites 4 bytes. A local attacker can trigger
70+
this again become root very quickly by overwriting the page cache's view of
71+
`sudo`. (Of course other sensitive binary code could be overwritten in memory.)
72+
This can be triggered via the IPsec `esp_input` (for both IPv4 and IPv6) as well
73+
as via the `rxrpc` code. The esp variant requires the privilege to create user
74+
namespaces and then allows for easy 4 byte writes at a time. It has been assigned
75+
CVE-2026-43284. The rxrpc variant overwrites 8 bytes and doe not require the
76+
namespace creation privileges, but as these bytes are crypted,
77+
the user needs to brute force them in order to achieve a controlled result. This
78+
variant was assigned CVE-2026-43500.
79+
80+
_Exploiting these vulnerabilities requires access to the system and the ability
81+
to execute code there, thus the categorization as Local Privilege Escalation (LPE),
82+
not Remote Code Execution (RCE)._
83+
84+
## Update 2026-05-13: Fragnesia
85+
86+
Yet another network fragment handling issue which fails to properly prevent
87+
in-place en/decryption which can be made to hit sensitive page cache contents
88+
that was put there with splice has been discovered with
89+
[Fragnesia](https://www.openwall.com/lists/oss-security/2026/05/13/3).
90+
It's a simple logic error where the sharing property is forgotten in buffer
91+
coalescing. It has gotten CVE-2026-46300.
92+
93+
## Update 2026-05-15: ssh-keysaign-pwn
94+
95+
This LPE is unrelated to the others; under certain circumstances, the kernel
96+
fails to prevent the dumping of process memory under ptraces, which can be used
97+
to read out sensitive data. As it can be used to read e.g. ssh keys, it has been called
98+
[ssh-keysign-pwn](https://github.com/0xdeadbeefnetwork/ssh-keysign-pwn). It has
99+
gotten CVE-2026-46333.
100+
101+
This vulerability allows local attackers to read sensitive data (Information
102+
Disclosure - ID) which may be useful to escalate privileges.
103+
104+
## Impact
105+
106+
Any system where normal (non-root) users can log in to execute code under their
107+
own control is no longer secure: The users can use the publicly available
108+
exploits to gain root privileges and get access to whatever the (virtual)
109+
machine has access to. This means accessing other user's data as well as secrets
110+
that may be stored by the system administrator.
111+
112+
Such systems are less common these days than they were 20 years ago. The reason
113+
is that virtualization has become a commodity, so in many scenarios, individual
114+
users may use their own virtual machine rather than having access to a shared
115+
(virtual) machine.
116+
117+
Note that this vulnerability does NOT break the isolation of virtual machines.
118+
VMs remain as securely isolated as they would be without this vulnerability.
119+
These LPEs do NOT establish a virtualization escape.
120+
121+
There is however a common scenario where individual users and workloads
122+
are running inside a container. The LPE also allows for escaping containers.
123+
Running a shell inside a kubernetes pod allows you to get control of the
124+
kubernetes node and thus of everything that your kubernetes cluster has
125+
access to. Running untrusted code in a container is thus very risky — something
126+
that will affect e.g. CI setups.
127+
128+
## Fixes
129+
130+
A fix to the Linux kernel for Copy.fail was silently merged at the end of March
131+
2026 (for 7.0-rc7) and also been merged to the stable kernel series (6.18.22,
132+
6.12.85, 6.6.137).
133+
It just disables the in-place optimization for `algif_aed`. As of early May,
134+
Linux distributors are currently underway to ship fixed kernels.
135+
Without a fixed kernel, a workaround is to place a file `copyfail.conf` in
136+
`/etc/modprobe.d/` with the contents:
137+
138+
```shell
139+
# Temporary workaround for copy.fail CVE-2026-31431
140+
install algif_aead /bin/false
141+
```
142+
143+
The fixes for Dirty Frag are still in development as of May 8. The first fixes
144+
have been merged upstream and released in 7.0.5, 6.18.28, 6.12.87, 6.6.138,
145+
6.1.172, 5.15.206 and 5.10.255 but there is
146+
[more to come for rxrpc](https://lwn.net/ml/all/2026050859-ahead-anchovy-05e2@gregkh/).
147+
Update 2026-05-11: 7.0.6 and 6.18.29 contain this last patch, older kernels don't need it.
148+
The responsible disclosure process for Dirty Frag unfortunately failed due to the
149+
[patches being spotted](https://www.openwall.com/lists/oss-security/2026/05/07/12),
150+
so the upstream maintainers and the distributors this time did not have time
151+
to carefully prepare and test fixes ahead of the publication of the issue.
152+
So we have to expect that it will take a few days until all Linux distributor
153+
manage to ship tested fixed kernels. Alma Linux has done so already, others are
154+
expected to follow soon.
155+
156+
A fully effective workaround is again to prevent loading the affected modules
157+
by placing another file `dirtyfrag.conf` in `/etc/modprobe.d/`:
158+
159+
```shell
160+
# Temporary workaround for Dirty Frag CVE-2026-43284, CVE-2026-43500, CVE-2026-46300
161+
# This breaks IPsec
162+
install esp4 /bin/false
163+
install esp6 /bin/false
164+
install rxrpc /bin/false
165+
```
166+
167+
Note that these workarounds prevent IPsec from working.
168+
169+
Update 2026-05-15: This mitigation helps against Fragnesia as well; AppArmor preventing
170+
unprivileged user namespaces (ubuntu) also helps. While a patch
171+
for Fragnesia was proposed, a fix has not been merged into the upstream kernel yet.
172+
Alma Linux has gone ahead and published a fixed kernel anyhow (for testing).
173+
174+
Update 2026-05-15: The stable kernels 7.0.8, 6.18.31, 6.12.89, 6.6.139, 5.15.207, and
175+
5.10.256 contain a fix for the ptrace vulnerability (CVE-2026-46333 aka ssh-keysign-pwn).
176+
The latter is hard to mitigate, as there's no Security Module hook. Setting up a seccomp
177+
that disallows ptrace would help.
178+
179+
If a system is suspected to already have been exploited, the system owner can
180+
dispose of the page cache by doing `echo 3 > /proc/sys/vm/drop_caches` as root
181+
and unload the affected modules to prevent re-exploitation.
182+
This will discard the modified page cache pages — however an attacker could have
183+
used its gained privileges to install further backdoors etc. into the system, so
184+
it will need to be reinstalled or fully audited to be considered trustable again.
185+
186+
## SCS IaaS Cloud Provider exposure
187+
188+
None of the control-plane / management systems in a normal SCS cloud infrastructure
189+
can be logged in by normal users. The LPE thus can not be exploited. However,
190+
should another exploit be found and used successfully, the LPEs may be used
191+
to escalate privileges further, e.g. breaking out of the containers that run
192+
the OpenStack services or Ceph or some of the management tools and thus remove
193+
one layer of a defense-in-depth concept.
194+
195+
Cloud Providers are advised to install updated kernels to reestablish the defense.
196+
They can apply the module loading prevention measures in the meantime. Providers
197+
are advised to use this with care on the network nodes — if these need to support
198+
IPsec (e.g. for OpenStack's VPNaaS which is part of neutron), the non-loadable
199+
modules may prevent correct operation. Please note that there is no known remote
200+
exploit via IPsec, so a temporary trade-off to live without the defense-in-depth
201+
and not break IPsec (and this way create security and functionality issues or for
202+
customers) may be justified.
203+
204+
Cloud providers often provide VM images for their customers.
205+
To support the customers to keep the security separation in the customer's VMs,
206+
they are advised to watch out for the availability of new distribution images
207+
and provide them short-term via their image service (glance).
208+
209+
## SCS Kubernetes Provider exposure
210+
211+
The default implementation with SCS Cluster Stacks is vulnerable; the current
212+
node images have a kernel that is affected by this weakness. This allows a user
213+
to break out of the containers running in the cluster to take over the node
214+
VM and other containers.
215+
216+
With Cluster-API and the SCS Cluster Stacks building
217+
on them, creating, updating and removing Kubernetes clusters has become
218+
a commodity; it is thus normal to create clusters per development team and
219+
not share them. In this scenario, the break out may allow a developer to
220+
take over containers from his team mates which may not constitute a real danger
221+
in many setups. For cluster setups across teams or worse for setups where several
222+
clusters that belong to different entities share a control plane, this becomes
223+
more serious.
224+
225+
Note that the LPE also removes a defense-in-depth mechanism, where a user of
226+
a service running in a k8s cluster exploits a vulnerability to be able to
227+
execute code in the container — the LPEs can then be used to escalate the
228+
privileges further.
229+
230+
As soon as new kernels become available, the node images will be rebuilt and
231+
shipped with the next cluster stack patch releases. For users, the normal
232+
rolling upgrade will then be all that's needed to be secure against this LPE
233+
again.
234+
235+
We will update this advisory as soon as new node images are available.
236+
237+
For highly critical workloads, cluster operators can log in to the nodes
238+
and deploy the mechanisms to prevent loading the above-mentioned modules.
239+
(Again, this will break IPsec.) Note that logging in to nodes in an SCS
240+
Cluster Stack cluster is not possible by default; it requires booting
241+
into a rescue image (if the cluster runs on OpenStack) to inject an ssh
242+
key or to use a tool like kubectl-node-shell with the appropriate
243+
privileges.
244+
245+
```bash
246+
for node in $(kubectl get nodes | grep -v '^NAME' | awk '{print $1;}'); do
247+
kubectl node_shell "$node" -- bash -c 'echo -e "# Temporarily disable algif_aead (copy.fail)\ninstall algif_aead /bin/false" > /etc/modprobe.d/disable-aead-copyfail.conf'
248+
kubectl node_shell "$node" -- bash -c 'echo -e "# Temporarily disable esp4, esp6, rxrpc (Dirty Frag)\ninstall esp4 /bin/false\ninstall esp6 /bin/false\ninstall rxrpc /bin/false" > /etc/modprobe.d/disable-esp46-rxrpc-dirtyfrag.conf'
249+
done
250+
```
251+
252+
## SCS Cloud users
253+
254+
Customers of SCS IaaS clouds are responsible for their own VMs. For VMs
255+
that are exposed, they should use the documented workaround inside their VMs,
256+
online-update and reboot into a fixed kernel or redeploy their VMs based
257+
on a fixed upstream image.
258+
259+
Customers that do their own Kubernetes Container Cluster Management
260+
with e.g. SCS Cluster Stacks are advised to watch out for new node
261+
images and then perform the rolling upgrade. If their use scenario puts
262+
them at increased risk, they are advised to prevent the module loading
263+
in the meantime, as advised above.
264+
265+
## SCS community infrastructure
266+
267+
The SCS community infrastructure was secured on May 8 by disabling the
268+
relevant modules.
269+
270+
## Outlook
271+
272+
The density with which severe issues are currently found is notable. While the
273+
research in the referenced issues originated from human beings being suspicious
274+
that certain things were not handled correctly everywhere, they were assisted
275+
by AI tools in the search. This pattern is likely to turn up a relevant number
276+
of such issues which are reachable now using such help until we may enjoy a
277+
more quiet time again. Until a new class of weaknesses comes into the reach of
278+
yet more powerful AI tools.
279+
280+
The other notable thing is that the quiet closing of issues within the Linux
281+
Kernel no longer works which has broken the responsible disclosure process
282+
that gave defenders some headway against attackers. One reason is that
283+
once a pattern emerges, several teams compete for speed to find related issues
284+
and decide in favor of disclosing before someone else finds it also. Another
285+
reason is that there are people that now use AI tools to analyze merged bugfixes
286+
to the kernel using AI tools - the fact that they are not flagged as security
287+
issues no longer is a good cover. So software distributors need to expect more
288+
of these occurences where they are struggling to patch software, validate the
289+
fixes and ship to customers before large-scale attacks happen. Operators will
290+
need to be fast as well.
291+
292+
So yes, the times are changing in software security and open source software is
293+
hit first being the most accessible to security researchers. On the proprietary
294+
side, we can suspect similar research is happening, but whether the research
295+
teams also go for fame and visibility or maybe have other prevalent incentives
296+
is an open question.
297+
298+
## Thanks
299+
300+
The authors would like to thank Taeyang Lee at Xint (who initiated the
301+
research on copy.fail) and Hyunwoo Kim (@v4bel, who discovered Dirty Frag).
302+
Update 2026-05-15: They would also like to acknowledge William Bowling (V12) for Fragnesia
303+
and Jann Horn and Qualys for ssh-keysign-pwn.
304+
They would also like to thank the upstream Linux kernel maintainers and
305+
Linux distributors for their reliable work no handling the issues and
306+
getting fixes out.
307+
308+
## Sovereign Cloud Stack Security Contact
309+
310+
SCS security contact is [security@scs.community](mailto:security@scs.community), as published on
311+
[https://sovereigncloudstack.org/.well-known/security.txt](https://scs.community/.well-known/security.txt).
312+
313+
## Version history
314+
315+
- Initial Draft, v0.1, 2026-05-08, 17:15 CEST.
316+
- kubectl node-shell instructions, v0.2, 2026-05-09, 12:45 CEST.
317+
- Mention succssful patching of community infra, v0.3, 2026-05-09, 13:30 CEST.
318+
- Correct facts on the failure of the responsible disclosure. Release as v1.0, 2026-05-09, 20:00 CEST.
319+
- Update on final rxrpc fix in stable kernels. v1.1, 2026-05-12, 08:45 CEST.
320+
- Add Fragnesia and ssh-keysign-pwn LPEs. v1.2, 2026-05-15, 17:15 CEST.
321+
- Add note on AI changing the game (outlook). v1.3, 2026-05-15, 17:30 CEST.

0 commit comments

Comments
 (0)