J. Bruce Fields ab1016d39c nfsd: fix NULL dereference in nfs3svc_encode_getaclres
In error cases the dentry may be NULL.

Before 20798dfe249a, 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: JianHong Yin <jiyin@redhat.com>
Reviewed-by: Chuck Lever III <chuck.lever@oracle.com>
Fixes: 20798dfe249a ("NFSD: Update the NFSv3 GETACL result encoder...")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2021-07-06 20:14:44 -04:00
..
2021-02-23 13:39:45 -08:00
2021-01-25 09:36:28 -05:00
2021-05-07 11:23:41 -07:00
2020-09-25 18:01:26 -04:00
2021-01-24 14:27:17 +01:00
2021-03-22 10:19:02 -04:00
2021-01-25 09:36:28 -05:00
2018-09-25 20:34:54 -04:00