aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2017-04-06 22:36:31 -0400
committerJ. Bruce Fields <bfields@redhat.com>2017-04-25 17:25:53 -0400
commit51f567777799c9d85a778302b9eb61cf15214a98 (patch)
treeee2eaef3db97b66bba958fc65ef519a6c4c922ab /include/uapi/linux/nfsd
parentnfsd: stricter decoding of write-like NFSv2/v3 ops (diff)
downloadlinux-dev-51f567777799c9d85a778302b9eb61cf15214a98.tar.xz
linux-dev-51f567777799c9d85a778302b9eb61cf15214a98.zip
nfsd: check for oversized NFSv2/v3 arguments
A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large it could leave inadequate space for the reply. This is normally OK because NFS RPC's typically have either short arguments and long replies (like READ) or long arguments and short replies (like WRITE). But a client that sends an incorrectly long reply can violate those assumptions. This was observed to cause crashes. So, insist that the argument not be any longer than we expect. Also, several operations increment rq_next_page in the decode routine before checking the argument size, which can leave rq_next_page pointing well past the end of the page array, causing trouble later in svc_free_pages. As followup we may also want to rewrite the encoding routines to check more carefully that they aren't running off the end of the page array. Reported-by: Tuomas Haanpää <thaan@synopsys.com> Reported-by: Ari Kauppi <ari@synopsys.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/uapi/linux/nfsd')
0 files changed, 0 insertions, 0 deletions