Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}