History log of /net/sunrpc/auth_gss/gss_rpc_xdr.c
Revision Date Author Comments
b26ec9b11b309acd9f6bb15fcc9bb396091384e8 08-Oct-2013 J. Bruce Fields <bfields@redhat.com> svcrpc: handle some gssproxy encoding errors

Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
9dfd87da1aeb0fd364167ad199f40fe96a6a87be 21-Aug-2013 J. Bruce Fields <bfields@redhat.com> rpc: fix huge kmalloc's in gss-proxy

The reply to a gssproxy can include up to NGROUPS_MAX gid's, which will
take up more than a page. We therefore need to allocate an array of
pages to hold the reply instead of trying to allocate a single huge
buffer.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
6a36978e6931e6601be586eb313375335f2cfaa3 23-Aug-2013 J. Bruce Fields <bfields@redhat.com> rpc: comment on linux_cred encoding, treat all as unsigned

The encoding of linux creds is a bit confusing.

Also: I think in practice it doesn't really matter whether we treat any
of these things as signed or unsigned, but unsigned seems more
straightforward: uid_t/gid_t are unsigned and it simplifies the ngroups
overflow check.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
778e512bb1d3315c6b55832248cd30c566c081d7 21-Aug-2013 J. Bruce Fields <bfields@redhat.com> rpc: clean up decoding of gssproxy linux creds

We can use the normal coding infrastructure here.

Two minor behavior changes:

- we're assuming no wasted space at the end of the linux cred.
That seems to match gss-proxy's behavior, and I can't see why
it would need to do differently in the future.

- NGROUPS_MAX check added: note groups_alloc doesn't do this,
this is the caller's responsibility.

Tested-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
dc43376c26cef74226174a2394f37f2a3f8a8639 07-Jun-2013 J. Bruce Fields <bfields@redhat.com> svcrpc: fix gss-proxy xdr decoding oops

Uninitialized stack data was being used as the destination for memcpy's.

Longer term we'll just delete some of this code; all we're doing is
skipping over xdr that we don't care about.

Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fb43f11c666a4f99f23f0be4fa528dcd288c0da2 07-May-2013 J. Bruce Fields <bfields@redhat.com> SUNRPC: fix decoding of optional gss-proxy xdr fields

The current code works, but sort of by accident: it obviously didn't
intend the error return to be interpreted as "true".

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
9fd40c5a66be0b0a5d65362ec139968ba6d1f412 06-May-2013 Geert Uytterhoeven <geert@linux-m68k.org> SUNRPC: Refactor gssx_dec_option_array() to kill uninitialized warning

net/sunrpc/auth_gss/gss_rpc_xdr.c: In function ‘gssx_dec_option_array’:
net/sunrpc/auth_gss/gss_rpc_xdr.c:258: warning: ‘creds’ may be used uninitialized in this function

Return early if count is zero, to make it clearer to the compiler (and the
casual reviewer) that no more processing is done.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
d28fcc830c2eadc526e43b0a5f6d2ed04e7421ef 30-Apr-2013 J. Bruce Fields <bfields@redhat.com> svcrpc: fix gss-proxy to respect user namespaces

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1d658336b05f8697d6445834f8867f8ad5e4f735 26-May-2012 Simo Sorce <simo@redhat.com> SUNRPC: Add RPC based upcall mechanism for RPCGSS auth

This patch implements a sunrpc client to use the services of the gssproxy
userspace daemon.

In particular it allows to perform calls in user space using an RPC
call instead of custom hand-coded upcall/downcall messages.

Currently only accept_sec_context is implemented as that is all is needed for
the server case.

File server modules like NFS and CIFS can use full gssapi services this way,
once init_sec_context is also implemented.

For the NFS server case this code allow to lift the limit of max 2k krb5
tickets. This limit is prevents legitimate kerberos deployments from using krb5
authentication with the Linux NFS server as they have normally ticket that are
many kilobytes large.

It will also allow to lift the limitation on the size of the credential set
(uid,gid,gids) passed down from user space for users that have very many groups
associated. Currently the downcall mechanism used by rpc.svcgssd is limited
to around 2k secondary groups of the 65k allowed by kernel structures.

Signed-off-by: Simo Sorce <simo@redhat.com>
[bfields: containerization, concurrent upcalls, misc. fixes and cleanup]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>