projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7193bd1
)
nfsd4: Fix MACH_CRED NULL dereference
author
J. Bruce Fields
<bfields@redhat.com>
Wed, 7 Aug 2013 15:41:49 +0000
(11:41 -0400)
committer
J. Bruce Fields
<bfields@redhat.com>
Wed, 7 Aug 2013 16:05:51 +0000
(12:05 -0400)
Fixes a NULL-dereference on attempts to use MACH_CRED protection over
auth_sys.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfsd/nfs4state.c
b/fs/nfsd/nfs4state.c
index 280acef6f0dc45e29365b197a8242f7d26bb22f7..43f42290e5df096fe7eced0266759b45264a61a1 100644
(file)
--- 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;