Nfs2root: A 12-year-old pre-auth remote root in the Linux kernel's NFS server (opensec.in)
51 points by dm 3 hours ago
gsich an hour ago
no poc posted
snizovtsev an hour ago
Claude is able to generate it in a few minutes if you have CVP. I do linux kernel patching as my day job, poc for this CVE is 106 lines of python code in my collection (1000+ ai-generated pocs since last month).
akersten 10 minutes ago
that's great for the 8 people that have access to that
rvz 2 hours ago
Just wow. How was this achieved? Let's see:
> Pre-auth heap overflow in the Linux NFS server (nfsd)
> Set it to the minimum and every slot's buffer is zero bytes. nfsd4_sequence() then shrinks the reply buffer to that limit before it accepts the slot. Pad the request's tag so the buffer fills right after the SEQUENCE opcode, and the encoder quits without flagging an error. The server believes SEQUENCE succeeded and caches the whole reply, headers and tag included, into a buffer with room for nothing.
Then it causes an out-of-bounds crash:
>> BUG: KASAN: slab-out-of-bounds in read_bytes_from_xdr_buf+0x1bc/0x390
>> Write of size 80 at addr ffff888003a549cd
>> __asan_memcpy+0x38/0x60
>> read_bytes_from_xdr_buf+0x1bc/0x390
>> nfsd4_sequence_done+0x5b0/0x810
>> nfs4svc_encode_compoundres+0x1bf/0x240
So yet another memory corruption issue that gives the attacker control of the execution and its possible to get root on the system and this is in the kernel itself so "hardening" does not remove the bug.What a disaster.
Bender an hour ago
Not sure why your comment was [dead]. Vouched.
Gigachad an hour ago
Thankfully no one assumed NFS secure for the public internet anyway so this should be minimally impactful. Also looks like it was patched upstream months ago.
Still, just another example of why C code can’t be exposed to the internet.
asveikau an hour ago
NFS in particular is an old protocol and authentication was bolted on later in its long history. It's pretty common to configure it in a way that you trust the client when they say they're root. This adds to the perception that nobody would assume it's safe to expose.
svl7 an hour ago
Well... I've seen enough examples in the past years of how trivial it is to get into bigger enterprise networks.Often solely with social engineering. NFS is in use at various places internally in my experience. So this can end up worse than anticipated if taken too lightly imo. Defense in depth...
Gigachad 32 minutes ago
I’m not saying ignore this, but it’s not a run around hair on fire situation like php2shell. Just update your servers as normal.
anthk 10 minutes ago
More than C, low level code for trivial userland daemons/functions. I remember WAV decoding functions on Win32 back in the day... in the kernel.
davrosthedalek an hour ago
Isn't this CVE-2026-99362? Because pretty much all of ubuntu installs are affected.
VorpalWay 44 minutes ago
I assume you mean "all Ubuntu installs of NFS" here. Your statement could be misread by those who don't know as "all Ubuntu installs", but NFS is not installed or turned on by default. I would expect very few installs do overall (but of course all of them will in specific environments).
asveikau 39 minutes ago
Most ubuntu installs aren't running NFS servers.
If someone sets up an NFS server, they know what kind of risk they open themselves up to.