r/programming • • 4d 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
219 Upvotes

23 comments sorted by

70

u/granadesnhorseshoes 4d 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.

41

u/zaypuma 4d ago

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

27

u/frymaster 4d ago

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

18

u/RegisteredJustToSay 4d 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.

7

u/tnoy 4d 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 4d ago edited 3d 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 4d ago

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

34

u/crusoe 3d ago

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

6

u/mnp 3d ago

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

4

u/yel50 3d 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 3d ago

you can, it is just difficult

10

u/ApertureNext 3d ago

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

2

u/efvie 3d ago

They were.

1

u/audentis 3d ago

curl.

0

u/--San-- 3d ago

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

7

u/yel50 3d 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.

2

u/--San-- 3d ago

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

1

u/crusoe 1d ago

You can't even by yourself. You would need to know every kind of UB in the c standard on top of using pointers correctly under all possible circumstances 

And if you later go back and add threads you better audit everything again 

0

u/[deleted] 4d ago

[deleted] — view deleted comment

13

u/Other_Fly_4408 4d 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.