Re: Preventing Denial of Service Attack In IPC Serialization
On Jul 8, 8:50 am, jlind...@hotmail.com wrote:
The reason Le Chaud Lapin cannot accept the notion of a prefixed
message length, on which to base DOS-resistance on, is that he is
committed to sending data through a "socket archive", without an
intermediary buffer. By the time he knows how much data is in the
message, it is too late to prefix it, because the data has of course
already been sent.
There are a few people who think the understand this issue but do not,
I do research in distributed communication, so not only do I have a
buffer in which data is received by a socket, I control the socket
itself, every single detail, from what the programmer sees when he
writes main() to what gets sent out Ethernet port by device driver in
kernel mode. Look for the 8192 in the code below, which is years old:
static const unsigned short int size_of_buffer = 8192;
// Large chunk of code snipped by Le Chaud Lapin.
unsigned char buffer[size_of_buffer];
Having a buffer as a "holding" station does not fix this problem. It
is plainly evident that I have one such buffer above, and I could
easily specify that no data more than 8192 bytes are to be brought
from this buffer at anyone time.
The problem would still exist.
In a serialization framework, one that is in a library (like Boost,
MFC, my own, etc.), only the objects themselves know best how much
that they should be allowed to consume...at that particular point in
It might take 2 weeks, or 2 years, but the people reading this thread
will eventually see that the (far better) solution is to let the
objects themselves participate in the reading of the data.
-Le Chaud Lapin-
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]