summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/svc_unix.c
Commit message (Collapse)AuthorAgeFilesLines
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Improve DoS avoidance in RPC stream oriented transports. The TCP transportwpaul1998-05-181-17/+35
| | | | | | | | | | | | | | | | | | | | | | uses readtcp() to gather data from the network; readtcp() uses select(), with a timeout of 35 seconds. The problem with this is that if you connect to a TCP server, send two bytes of data, then just pause, the server will remain blocked in readtcp() for up to 35 seconds, which is sort of a long time. If you keep doing this every 35 seconds, you can keep the server occupied indefinitely. To fix this, I modified readtcp() (and its cousin, readunix() in svc_unix.c) to monitor all service transport handles instead of just the current socket. This allows the server to keep handling new connections that arrive while readtcp() is running. This prevents one client from potentially monopolizing a server. Also, while I was here, I fixed a bug in the timeout calculations. Someone attempted to adjust the timeout so that if select() returned EINTR and the loop was restarted, the timeout would be reduced so that rather than waiting for another 35 seconds, you could never wait for more than 35 seconds total. Unfortunately, the calculation was wrong, and the timeout could expire much sooner than 35 seconds.
* Patch RPC library to avoid possible denial of service attacks as describedwpaul1998-05-151-1/+2
| | | | | | recently in BUGTRAQ. If a stream oriented transport fails to properly decode an RPC message header structure where there should be one, it should mark the stream as dead so that the connection will be dropped.
* This commit was generated by cvs2svn to compensate for changes in r26219,wpaul1997-05-281-0/+511
which included commits to RCS files with non-trunk default branches.
OpenPOWER on IntegriCloud