summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2018-05-07 09:01:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-03 11:21:33 +0200
commit2a3af73c75f2b20d65207d718d62f230460fe4e7 (patch)
tree627b3d87ddab46a46475dc579b6944606b048fe9 /net/unix/af_unix.c
parentc5808ebb3a6a0937130c9099c2c8e400efb0cd22 (diff)
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>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions