Re: NFS and setuid programs fails on 2.1

Kees Bakker (kees_bakker@tasking.nl)
12 Aug 1998 22:28:14 +0200


>>>>> "Alan" == Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

>> The 2.1 kernel has a problem with setuid programs that try to write a file
>> on NFS mounted fs. It has nothing to do with root access to NFS fs. It's
>> really a bug and it has been introduced in the 2.1 kernel.

Alan> Does 2.1.115ac1/ac2 also show this problem.

Yes 2.1.115ac2 still has the problem.

Alan> They do have a couple of NFS permission fixes in that ought to work

Which fixes where you talking about?

[...]
Alan> First NFS isnt a posix compliant file system. Because its pseudo stateless
Alan> the current uid not the opening uid is applied to requests. The kernel is
Alan> fairly smart - it maps permission errors to a retry with real uid/gid. The
Alan> older code however onyl caught one of the error codes involved

I looked at the place where it does that retry. However, I couldn't catch
the point where the original uid/gid is set. The debugging output only
shows the new uid/gid of the process. Even if we could mark this as
RPC_IS_SETUID(task) I still could find the other uid/gid.
I'm pretty much lost going through these sunrpc and nfs logs.

The patch in sunrpc/clnt.c in 2.1.110 looks very applicable, however, it
didn't fix this one.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html