diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-06-26 10:55:40 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-07-01 17:32:04 -0400 |
commit | 1f691b07c5dc51b2055834f58c0f351defd97f27 (patch) | |
tree | 2dcc564979512da4e0db2975eca9ad0b3c662b85 /net/sunrpc | |
parent | cf3aa02cb4a0c5af5557dd47f15a08a7df33182a (diff) | |
download | op-kernel-dev-1f691b07c5dc51b2055834f58c0f351defd97f27.zip op-kernel-dev-1f691b07c5dc51b2055834f58c0f351defd97f27.tar.gz |
svcrpc: don't error out on small tcp fragment
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.
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc')
-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 df74919..305374d 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. */ } |