Commit 3378b7f4 authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd4: fix discarded security labels on setattr

Security labels in setattr calls are currently ignored because we forget
to set label->len.

Cc: stable@vger.kernel.org
Reported-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 8217d146
...@@ -411,6 +411,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, ...@@ -411,6 +411,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
label->data = kzalloc(dummy32 + 1, GFP_KERNEL); label->data = kzalloc(dummy32 + 1, GFP_KERNEL);
if (!label->data) if (!label->data)
return nfserr_jukebox; return nfserr_jukebox;
label->len = dummy32;
defer_free(argp, kfree, label->data); defer_free(argp, kfree, label->data);
memcpy(label->data, buf, dummy32); memcpy(label->data, buf, dummy32);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment