Re: Preventing Denial of Service Attack In IPC Serialization
In article <email@example.com>,
Le Chaud Lapin <firstname.lastname@example.org> wrote:
On Jun 11, 10:18 am, jlind...@hotmail.com wrote:
LOL. I am deserializing from a _packet_ ! A packet of fixed length,
completely unlike the socket that you are deserializing from. I am
guaranteed a successful reception or an EOF exception, without ever
reading more than e.g. 1 Mb from the client. The only DOS
vulnerability in sight is if my _application_ is reading an unlimited
number of strings, for reasons of its own. But that has nothing, I
repeat _nothing_, to do with the deserialization code of individual
strings. Do you not see that?
Why are you doing that? I mentioned that I was deserializing from a
socket, not a packet.
For the sake of argument, let's talk about about sending a non-simple
structure, such as a vector<string>.
Even if you determine that it would be a DoS attack in requesting too
much memory, how exactly do you reject a message?
What if it is a different DoS attack, such as a bad count of elements
(either in a given string and/or in the vector itself)?
W/o framing, checksums, etc., you are pretty much hosed, whether or not
you use serialization. How do you plan on syncing up with the next
And if you add framing and checksums, you are talking about packets, not
just raw sockets...
(Also, could you please steer the discussion back towards C++?)
Nevin ":-)" Liber <mailto:email@example.com> 773 961-1620
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]