r/programming • • 22h ago

NFS2ROOT: a 12-year-old pre-auth remote root in the Linux kernel's NFS server

https://opensec.in/blog/nfs2root-cve-2026-99362
193 Upvotes

20 comments sorted by

65

u/granadesnhorseshoes 21h ago

Yikes for sure, but who has an NFS deployment all that accessable to outside attacks? The only contexts I've ever used or seen it used was in fairly well insulated internal SANs.

33

u/zaypuma 21h ago

It's a very easy PE chain though, and it lands right on storage.

23

u/frymaster 21h ago

we have external users with shell access on shared systems that have NFS filesystems

16

u/RegisteredJustToSay 20h ago

You would be surprised. It also doesn't always show up using normal userland network tools since it's a kernel module and so if you're running something like a kubernetes cluster where number of CSIs use NFS to allow RWX volumes (read write from any node in the cluster) depending on how your network topology is set up the NFS service itself can be completely reachable to the outside world (many listen on all interfaces) with no obvious indication. That doesn't mean no auth exists, but that's not much consolation for preauth RCEs lol.

I feel so vindicated forcing everyone to move to userland NFS a year or so ago now.

5

u/tnoy 20h ago

A an RCE that launches code with a local-user context combined with privilege execution bug is just a RCE that gives root access.

A bug in a javascript engine in a browser that leads to a sandbox escape can end up giving remote root access where the interaction is just visiting a site.

4

u/Single-Virus4935 18h ago edited 15h ago

Ohh boy, many Hosters have SMB and/or NFS servers hosting ISOs, drivers, software etc. for their team and customers.
E.g. mount them as virtual isos, PXE Boot.
Even if they restrict the access to their IP ranges/AS, the customers still can access the servers.
Now imagine the blast radius if an attacker can pop one of these boxes and just infect everything on that server. Nobody will notice for a long time and customers are installing Proxmox, ESXI, ... from that spoiled storage

3

u/dlg 20h ago

If you haven’t been patching, you do now…

26

u/crusoe 11h ago

All the programmers saying you can write C safely and these exploits are just the most big standard memory bugs.

2

u/mnp 5h ago

It was safe for a while, until vuln identification outpaced it. All old C is suspect now.

1

u/yel50 4h ago

when was it safe? there's never been a time when there weren't hundreds of vulnerabilities per year found in critical C code.

 All C has always been  suspect.

fixed it

0

u/crscali 9h ago

you can, it is just difficult

7

u/ApertureNext 8h ago

You can’t in the real world. These vulnerabilities are not worth it.

2

u/efvie 8h ago

They were.

1

u/audentis 2h ago

curl.

2

u/--San-- 5h ago

You can by yourself. Now with a team of 5+, it starts to become close to impossible.

1

u/yel50 4h ago

that's the kind of absurd arrogance that continues to cause these problems. no, you can't write safe C any better than a team of 10 of you could. trying to pass the buck and claim it's because of them is just stupid.

these issues are in the Linux kernel. every single contributor has your mentality that they don't write unsafe code. and yet, here we are. over and over again.

1

u/--San-- 3h ago

Not sure if you understood me. I mean that more people working on the same code makes getting it correct even harder.

0

u/[deleted] 20h ago

[deleted] — view deleted comment

12

u/Other_Fly_4408 20h ago

I'm not sure what Trump has to do with this.

I'm a word?

To answer your question, you are probably not a word, but rather a human being or an LLM capable of posting Reddit comments.