An unofficial, read-only Hacker News reader.

Nfs2root: A 12-year-old pre-auth remote root in the Linux kernel's NFS server (opens external site)

216 points by dm 4 days ago | opensec.in | 95 comments on HN

View full thread · View on Hacker News

Comment thread (8)

  1. 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.
    Replies (2)
    1. NFSv3 assumes that uid/gid synchronization is in place, and maps root activity on the shared volume to some kind of nobody (unless the volume is exported nosquash). The username is irrelevant; the uid controls access (AFAIK).

      NFSv4 needs idmapd, which is a different beast altogether.

      Replies (2)
      1. also you can nail on kerberos to actually enforce permissions if you're still just doing uid/guid matching.

        Still, getting root on your internal fileserver isn't great.

      2. NFSv4 can also run in the sec=sys mode, without idmapd, where it blindly trusts the client-supplied UID, exactly as NFSv3 does.
        Replies (1)
        1. I did not know that. Thanks!
    2. > It's pretty common to configure it in a way that you trust the client when they say they're root

      This is how you can tell you’re reading a post from a Real Old Time hacker. Hasn’t been that way for a long time.

      Replies (2)
      1. I will take that as a compliment.
      2. The root_squash option has been default since as long as I can remember.