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

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

nfsd4: buffer-length check for SUPPATTR_EXCLCREAT



This was an omission from 8c18f205
"nfsd41: SUPPATTR_EXCLCREAT attribute".

Cc: Benny Halevy <bhalevy@primarydata.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 1406b916
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2483,6 +2483,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
			goto out;
	}
	if (bmval2 & FATTR4_WORD2_SUPPATTR_EXCLCREAT) {
		if ((buflen -= 16) < 0)
			goto out_resource;
		WRITE32(3);
		WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD0);
		WRITE32(NFSD_SUPPATTR_EXCLCREAT_WORD1);