Skip to content

Commit

Permalink
nfsd4: fix discarded security labels on setattr
Browse files Browse the repository at this point in the history
Security labels in setattr calls are currently ignored because we forget
to set label->len.

Cc: stable@vger.kernel.org
Reported-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
J. Bruce Fields committed Nov 1, 2013
1 parent 8217d14 commit 3378b7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
label->data = kzalloc(dummy32 + 1, GFP_KERNEL);
if (!label->data)
return nfserr_jukebox;
label->len = dummy32;
defer_free(argp, kfree, label->data);
memcpy(label->data, buf, dummy32);
}
Expand Down

0 comments on commit 3378b7f

Please sign in to comment.