projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5393b7
)
nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
author
J. Bruce Fields
<bfields@redhat.com>
Tue, 28 Jan 2014 21:05:15 +0000
(16:05 -0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:55:29 +0000
(07:55 -0700)
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>
fs/nfsd/nfs4xdr.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4xdr.c
b/fs/nfsd/nfs4xdr.c
index 582321a978b0cbba31fd26d92bc9d8ec93ad4502..d7ea1938cdee3a721f1f991fc9de955d4429968c 100644
(file)
--- a/
fs/nfsd/nfs4xdr.c
+++ b/
fs/nfsd/nfs4xdr.c
@@
-2401,6
+2401,8
@@
out_acl:
WRITE64(stat.ino);
}
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);