On Tue, 3 Nov 2009, Ross Walker wrote:

> Maybe this isn't an interoperability fix, but a security fix as it allows
> non-Sun clients to bypass security restrictions placed on a sgid
> protected directory tree because it doesn't properly test the existence
> of that bit upon file creation.
>
> If an appropriate scenario can be made, and I'm sure it can, one might
> even post a CERT advisory to make sure operators are made aware of this
> potential security problem.

I agree it's a security issue, I think I mentioned that at some point in
this thread. However, it doesn't allow a client to do something they
couldn't do anyway. If the sgid bit was respected and the directory was
created with the right group, the client could chgrp it to their primary
group afterwards. The security issue isn't that an evil client will avail
of this to end up with a directory owned by the wrong group, it's that a
poor innocent client will end up with a directory owned by their primary
group rather than the group of the parent directory, and any inherited
group@ ACL will apply to the primary group, resulting in insecure and
unintended access :(.

Another possible security issue that came up while I was discussing this
issue with one of the Linux NFSv4 developers is that relying upon the
client to set the ownership of the directory results in a race condition
and is in their opinion buggy.

In between the time the client generates the mkdir request and sends it
over the wire and the server receives it, someone else might have changed
the permissions or group ownership of the parent directory, resulting in
the explicitly specified group provided by the client being wrong. They
refuse to implement this buggy behavior, and to quote them, "You should get
Sun to fix their server".

I'm trying to do that, but no luck so far <sigh>...


-- 
Paul B. Henson  |  (909) 979-6361  |  http://www.csupomona.edu/~henson/
Operating Systems and Network Analyst  |  hen...@csupomona.edu
California State Polytechnic University  |  Pomona CA 91768
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to