All of lore.kernel.org
 help / color / mirror / Atom feed
* Please support NSF squashing multiple groups
@ 2011-08-19  0:32 paul.szabo
  2011-08-19  1:05 ` NeilBrown
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: paul.szabo @ 2011-08-19  0:32 UTC (permalink / raw)
  To: linux-nfs

Dear Linux-NFS people,

NFS has always had the root_squash option, to protect against a remote
and possibly evil root. NFS should also protect all privileged, or at
least all root-equivalent, UIDs and GIDs. Many UNIX distributions have
root-equivalent GIDs, groups whose members could easily become root,
some listed in http://bugs.debian.org/299007#219 .

Currently, NFS has no ways to protect privileged UIDs and GIDs other
than root himself. Such options should be implemented, to make NFS
safer and more useful. As I understand it, the hold-up is not within
NFS code, but with kernel interfaces not supporting lists of squashed
entities. I am asking you to devise and implement such interfaces.

References:
http://bugs.debian.org/299007
http://bugs.debian.org/384922
http://bugs.debian.org/538392
https://bugzilla.kernel.org/show_bug.cgi?id=14295

Thanks, Paul

Paul Szabo   psz@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: Please support NSF squashing multiple groups
@ 2011-09-20 22:48 paul.szabo
  2011-09-20 23:05 ` Trond Myklebust
  0 siblings, 1 reply; 23+ messages in thread
From: paul.szabo @ 2011-09-20 22:48 UTC (permalink / raw)
  To: linux-nfs

Dear all,

I wrote about some security issues with NFS, about protecting against
privileged UIDs and GIDs, like root_squash protects against root.

Your advice was to use NFSv4 with kerberos authentication. I now
succeeded in setting that up on a test system; though not as simple as
should be, it seems to work as expected. The changes required for use
are non-trivial, so I will not immediately be able to use it.

Seems that the mountd option --manage-gids handles the secondary groups
only. I still do not quite understand why mountd (with that or another
option) cannot handle the primary GID also, setting it to the GID
corresponding to the UID on the server; and maybe even "squash" any UIDs
in a table similar to idmap, or simply squash UIDs less than UID_MIN
(squash directly, without any kernel interaction). Could you please tell
me whether those are conceptually possible?

Thanks, Paul

Paul Szabo   psz@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia

^ permalink raw reply	[flat|nested] 23+ messages in thread
* Re: Please support NSF squashing multiple groups
@ 2011-09-30  4:08 paul.szabo
  0 siblings, 0 replies; 23+ messages in thread
From: paul.szabo @ 2011-09-30  4:08 UTC (permalink / raw)
  To: linux-nfs

Dear all,

I wrote recently:

  Seems that the mountd option --manage-gids handles the secondary groups
  only. I still do not quite understand why mountd (with that or another
  option) cannot handle the primary GID also, setting it to the GID
  corresponding to the UID on the server; and maybe even "squash" any UIDs
  in a table similar to idmap, or simply squash UIDs less than UID_MIN
  (squash directly, without any kernel interaction). Could you please tell
  me whether those are conceptually possible?

Silly me, should have looked myself! Now I understand that things are
not "done" in mountd, but are in the kernel: the use of those
/proc/net/rpc/%s/channel things is not in the mountd binary, but in the
kernel linux-source-2.6.32/net/sunrpc/svcauth_unix.c . No use setting
things up in mountd, if the kernel does not bother using them.

So it remains that for security, I would need NFSv4 with kerberos.

Thanks for all your help, and apologies for my stubbornness.

Cheers, Paul

Paul Szabo   psz@maths.usyd.edu.au   http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics   University of Sydney    Australia

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-09-30  4:09 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19  0:32 Please support NSF squashing multiple groups paul.szabo
2011-08-19  1:05 ` NeilBrown
2011-08-19  2:10   ` paul.szabo
2011-08-19 19:19     ` J. Bruce Fields
2011-08-19 22:06       ` paul.szabo
2011-08-19 22:15         ` Andy Adamson
2011-08-19 22:35           ` paul.szabo
2011-08-19 23:45             ` J. Bruce Fields
2011-08-20  0:19               ` NeilBrown
2011-08-22 14:23             ` Andy Adamson
2011-08-19 19:29 ` J. Bruce Fields
2011-08-19 22:21   ` paul.szabo
2011-08-22 16:14 ` Jim Rees
     [not found]   ` <20110822161413.GE2477-8f4Pc2RrbJmHXe+LvDLADg@public.gmane.org>
2011-08-22 21:05     ` paul.szabo-E0wInbZyfUpWG/WdbR7gnQ
  -- strict thread matches above, loose matches on Subject: below --
2011-09-20 22:48 paul.szabo
2011-09-20 23:05 ` Trond Myklebust
2011-09-20 23:29   ` paul.szabo
2011-09-20 23:38     ` Myklebust, Trond
2011-09-21  0:09       ` paul.szabo
2011-09-21  4:16         ` Myklebust, Trond
2011-09-21  5:38           ` paul.szabo
2011-09-20 23:47     ` Myklebust, Trond
2011-09-30  4:08 paul.szabo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.