diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-06-26 10:55:40 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 14:07:32 -0700 |
commit | 369cf4be7588876d071c86d0efb7908e9bba7f6f (patch) | |
tree | 2b12404bbcc9cf21f5d622d718d4005b1a874cd1 | |
parent | 57370589c166cc8747f5e09365407d9dc04d7425 (diff) | |
download | linux-3.10-369cf4be7588876d071c86d0efb7908e9bba7f6f.tar.gz linux-3.10-369cf4be7588876d071c86d0efb7908e9bba7f6f.tar.bz2 linux-3.10-369cf4be7588876d071c86d0efb7908e9bba7f6f.zip |
svcrpc: don't error out on small tcp fragment
commit 1f691b07c5dc51b2055834f58c0f351defd97f27 upstream.
Though clients we care about mostly don't do this, it is possible for
rpc requests to be sent in multiple fragments. Here we have a sanity
check to ensure that the final received rpc isn't too small--except that
the number we're actually checking is the length of just the final
fragment, not of the whole rpc. So a perfectly legal rpc that's
unluckily fragmented could cause the server to close the connection
here.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/sunrpc/svcsock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index df74919c81c..305374d4fb9 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -1095,7 +1095,7 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp) goto err_noclose; } - if (svc_sock_reclen(svsk) < 8) { + if (svsk->sk_datalen < 8) { svsk->sk_datalen = 0; goto err_delete; /* client is nuts. */ } |