]> www.infradead.org Git - users/hch/xfs.git/commit
nfsd: ensure that nfsd4_fattr_args.context is zeroed out
authorJeff Layton <jlayton@kernel.org>
Thu, 22 Aug 2024 18:47:01 +0000 (14:47 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 22 Aug 2024 18:49:10 +0000 (14:49 -0400)
commitf58bab6fd4063913bd8321e99874b8239e9ba726
treef790c9dacff46590d07a1b3811eecb9a7e36efe4
parent91da337e5d506f2c065d20529d105ca40090e320
nfsd: ensure that nfsd4_fattr_args.context is zeroed out

If nfsd4_encode_fattr4 ends up doing a "goto out" before we get to
checking for the security label, then args.context will be set to
uninitialized junk on the stack, which we'll then try to free.
Initialize it early.

Fixes: f59388a579c6 ("NFSD: Add nfsd4_encode_fattr4_sec_label()")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4xdr.c