freebsd-dev/lib/libc/xdr
Bill Paul 1ce4aec2b4 Change the sanity test here. It's not correct to assume that the record
size we receive here should fit into the receive buffer. Unfortunately,
there's no 100% foolproof way to distinguish a ridiculously large record
size that a client actually meant to send us from a ridiculously large
record size that was sent as a spoof attempt.

The one value that we can positively identify as bogus is zero. A
zero-sized record makes absolutely no sense, and sending an endless
supply of zeroes will cause the server to loop forever trying to
fill its receive buffer.

Note that the changes made to readtcp() make it okay to revert this
sanity test since the deadlock case where a client can keep the server
occupied forever in the readtcp() select() loop can't happen anymore.
This solution is not ideal, but is relatively easy to implement. The
ideal solution would be to re-arrange the way dispatching is handled
so that the select() loop in readtcp() can be eliminated, but this is
difficult to implement. I do plan to implement the complete solution
eventually but in the meantime I don't want to leave the RPC library
totally vulnerable.

That you very much Sun, may I have another.
1998-05-20 15:56:11 +00:00
..
Makefile.inc Removed the subdirectory paths from the definitions of MAN[1-9]. They 1997-10-15 16:16:41 +00:00
xdr_array.c Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr_float.c Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr_mem.c Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr_rec.c Change the sanity test here. It's not correct to assume that the record 1998-05-20 15:56:11 +00:00
xdr_reference.c Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr_sizeof.c Cast a pointer to a long, not an int and make the arg passed to the function 1998-05-11 09:10:38 +00:00
xdr_stdio.c Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr.3 Resolve conflicts. 1997-05-28 04:57:39 +00:00
xdr.c Resolve conflicts. 1997-05-28 04:57:39 +00:00