android_kernel_oneplus_msm8998/fs/nfsd
Scott Mayhew 2a3af73c75 nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir
commit 9c2ece6ef67e9d376f32823086169b489c422ed0 upstream.

nfsd4_readdir_rsize restricts rd_maxcount to svc_max_payload when
estimating the size of the readdir reply, but nfsd_encode_readdir
restricts it to INT_MAX when encoding the reply.  This can result in log
messages like "kernel: RPC request reserved 32896 but used 1049444".

Restrict rd_dircount similarly (no reason it should be larger than
svc_max_payload).

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:21:33 +02:00
..
acl.h
auth.c nfsd: auth: Fix gid sorting when rootsquash enabled 2018-01-31 12:06:14 +01:00
auth.h
blocklayout.c fs: add i_blocksize() 2017-06-14 13:16:24 +02:00
blocklayoutxdr.c
blocklayoutxdr.h
cache.h
current_stateid.h
export.c
export.h
fault_inject.c
idmap.h
Kconfig
lockd.c
Makefile
netns.h
nfs2acl.c nfsd: check permissions when setting ACLs 2016-07-27 09:47:30 -07:00
nfs3acl.c nfsd: check permissions when setting ACLs 2016-07-27 09:47:30 -07:00
nfs3proc.c
nfs3xdr.c nfsd: stricter decoding of write-like NFSv2/v3 ops 2017-05-08 07:46:02 +02:00
nfs4acl.c nfsd: check permissions when setting ACLs 2016-07-27 09:47:30 -07:00
nfs4callback.c nfsd/callback: Cleanup callback cred on shutdown 2017-10-21 17:09:06 +02:00
nfs4idmap.c
nfs4layouts.c NFSD: Fix a null reference case in find_or_create_lock_stateid() 2017-02-09 08:02:45 +01:00
nfs4proc.c nfsd4: permit layoutget of executable-only files 2018-03-24 10:58:48 +01:00
nfs4recover.c
nfs4state.c lockd: fix "list_add double add" caused by legacy signal interface 2018-02-03 17:04:28 +01:00
nfs4xdr.c nfsd: restrict rd_maxcount to svc_max_payload in nfsd_encode_readdir 2018-07-03 11:21:33 +02:00
nfscache.c
nfsctl.c
nfsd.h
nfsfh.c
nfsfh.h
nfsproc.c
nfssvc.c NFSD: fix nfsd_reset_versions for NFSv4. 2017-12-20 10:04:53 +01:00
nfsxdr.c nfsd: stricter decoding of write-like NFSv2/v3 ops 2017-05-08 07:46:02 +02:00
pnfs.h
state.h nfsd/callback: Cleanup callback cred on shutdown 2017-10-21 17:09:06 +02:00
stats.c
stats.h
trace.c
trace.h
vfs.c NFS: don't try to cross a mountpount when there isn't one there. 2018-03-24 10:58:44 +01:00
vfs.h
xdr.h
xdr3.h
xdr4.h
xdr4cb.h