Skip to contentSkip to conversation

nfsd4: fix discarded security labels on setattr

PATCH In review J. Bruce Fields 1 participant 2 messages Nov 1, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsd4: fix discarded security labels on setattr

Jeff just noticed this. Argh.

--b.

commit 1012e867f57b3ae5712ea329065a9ab899c7986c

Author: J. Bruce Fields <[email protected]>
Date:   Fri Nov 1 10:42:15 2013 -0400

nfsd4: fix discarded security labels on setattr

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

fs/nfsd/nfs4xdr.c +1 -0
index d9454fe..438d818 100644
@@ -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);
 	}
#1 lore raw
Quoted 1 line · J. Bruce Fields

Jeff just noticed this. Argh.

Applying for 3.13.--b.

Quoted 31 lines

--b.

commit 1012e867f57b3ae5712ea329065a9ab899c7986c

Author: J. Bruce Fields <[email protected]>
Date:   Fri Nov 1 10:42:15 2013 -0400

nfsd4: fix discarded security labels on setattr

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

fs/nfsd/nfs4xdr.c +1 -1
index d9454fe..438d818 100644
@@ -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);
 	}
--

To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html