linux/net/sunrpc/auth_gss
Trond Myklebust a652a4bc21 SUNRPC: Fix a Oops when destroying the RPCSEC_GSS credential cache
Commit 07d02a67b7 causes a use-after free in the RPCSEC_GSS credential
destroy code, because the call to get_rpccred() in gss_destroying_context()
will now always fail to increment the refcount.

While we could just replace the get_rpccred() with a refcount_set(), that
would have the unfortunate consequence of resurrecting a credential in
the credential cache for which we are in the process of destroying the
RPCSEC_GSS context. Rather than do this, we choose to make a copy that
is never added to the cache and use that to destroy the context.

Fixes: 07d02a67b7 ("SUNRPC: Simplify lookup code")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2018-11-12 16:39:13 -05:00
..
auth_gss.c SUNRPC: Fix a Oops when destroying the RPCSEC_GSS credential cache 2018-11-12 16:39:13 -05:00
gss_generic_token.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_crypto.c gss_krb5: Remove VLA usage of skcipher 2018-09-28 12:46:07 +08:00
gss_krb5_keys.c gss_krb5: Remove VLA usage of skcipher 2018-09-28 12:46:07 +08:00
gss_krb5_mech.c NFS client bugfixes for Linux 4.20 2018-11-04 08:20:09 -08:00
gss_krb5_seal.c SUNRPC: Use atomic(64)_t for seq_send(64) 2018-11-01 13:55:24 -04:00
gss_krb5_seqnum.c gss_krb5: Remove VLA usage of skcipher 2018-09-28 12:46:07 +08:00
gss_krb5_unseal.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
gss_krb5_wrap.c NFS client bugfixes for Linux 4.20 2018-11-04 08:20:09 -08:00
gss_mech_switch.c SUNRPC: Lockless lookup of RPCSEC_GSS mechanisms 2018-09-30 15:35:17 -04:00
gss_rpc_upcall.c sunrpc: Extract target name into svc_cred 2018-08-22 18:32:07 -04:00
gss_rpc_upcall.h Merge branch 'nfs-for-next' of git://linux-nfs.org/~trondmy/nfs-2.6 into for-3.10 2013-04-29 16:23:34 -04:00
gss_rpc_xdr.c SUNRPC: Add a label for RPC calls that require allocation on receive 2018-09-30 15:35:16 -04:00
gss_rpc_xdr.h sunrpc/auth_gss: fix decoder callback prototypes 2017-07-13 15:57:55 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svcauth_gss.c SUNRPC: Lockless server RPCSEC_GSS context lookup 2018-10-29 16:58:04 -04:00