diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-08-07 19:41:49 +0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-08-07 20:05:51 +0400 |
commit | c47205914cf5a8cf564ca560aa6eaa2287867e58 (patch) | |
tree | fab725d3eea67979da88221642fca0cb91d34412 /fs/nfsd | |
parent | 7193bd17ea92c4c89016c304362c9be93ce50050 (diff) | |
download | linux-c47205914cf5a8cf564ca560aa6eaa2287867e58.tar.xz |
nfsd4: Fix MACH_CRED NULL dereference
Fixes a NULL-dereference on attempts to use MACH_CRED protection over
auth_sys.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 280acef6f0dc..43f42290e5df 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1264,6 +1264,8 @@ static bool svc_rqst_integrity_protected(struct svc_rqst *rqstp) struct svc_cred *cr = &rqstp->rq_cred; u32 service; + if (!cr->cr_gss_mech) + return false; service = gss_pseudoflavor_to_service(cr->cr_gss_mech, cr->cr_flavor); return service == RPC_GSS_SVC_INTEGRITY || service == RPC_GSS_SVC_PRIVACY; |