Skip to content
Commit ab1016d3 authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd: fix NULL dereference in nfs3svc_encode_getaclres



In error cases the dentry may be NULL.

Before 20798dfe, the encoder also checked dentry and
d_really_is_positive(dentry), but that looks like overkill to me--zero
status should be enough to guarantee a positive dentry.

This isn't the first time we've seen an error-case NULL dereference
hidden in the initialization of a local variable in an xdr encoder.  But
I went back through the other recent rewrites and didn't spot any
similar bugs.

Reported-by: default avatarJianHong Yin <jiyin@redhat.com>
Reviewed-by: default avatarChuck Lever III <chuck.lever@oracle.com>
Fixes: 20798dfe ("NFSD: Update the NFSv3 GETACL result encoder...")
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 7b08cf62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment