diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-01-28 16:05:15 -0500 |
---|---|---|
committer | Show Liu <show.liu@linaro.org> | 2014-06-18 11:40:30 +0800 |
commit | 0c3aa91f1531e5aa8c3cfa6f21bc051a54424b2c (patch) | |
tree | 432a4b6237a77150d8c4c338af48a2359fc479eb /fs | |
parent | c89e60c2f2c522ced99d1536ba2f0a600e3b87f6 (diff) |
nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
commit de3997a7eeb9ea286b15879fdf8a95aae065b4f7 upstream.
This was an omission from 8c18f2052e756e7d5dea712fc6e7ed70c00e8a39
"nfsd41: SUPPATTR_EXCLCREAT attribute".
Cc: Benny Halevy <bhalevy@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 63f2395c57e..668bfe1fcde 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2483,6 +2483,8 @@ out_acl: 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); |