No subject
Thu Feb 16 03:44:05 GMT 2012
explicitly specified
--14dae93a122f5c3c9f04be749b1f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all,<br>I'm investigating a case when in certain conditions .net cli=
ent can kill server for ~15minutes.<br>We have a specific firewall setup an=
d it can return an ascii string "uou do not have access to this servic=
e". Details do not matter, but in such case .net client will just kill=
the client box instantly. Even mouse wont move.<br>
<br>I've investigated it and found that the problem is in RabbitMQ.Clie=
nt.Impl.Frams.cs:ReadFrom():<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int paylo=
adSize =3D reader.ReadInt32(); // FIXME - throw exn on unreasonable value<b=
r>In case if client attempts to connect to a socket which returns non-ampq =
message, it will attempt to allocate an array, of generally speaking random=
size.<br>
Ampq-0.9.1 spec (paragraph 4.2.3=A0 General Frame Format) says:<br>> If =
a peer receives a frame with a type that is not one of these defined types,=
it MUST treat this as a<br>fatal protocol error and close the connection w=
ithout sending any further data on it<br>
<br>But I can not understand the logic of the code in Frame.ReadFrom:<br><a=
href=3D"http://hg.rabbitmq.com/rabbitmq-dotnet-client/file/0d3c7b59412e/pr=
ojects/client/RabbitMQ.Client/src/client/impl/Frame.cs#l107">http://hg.rabb=
itmq.com/rabbitmq-dotnet-client/file/0d3c7b59412e/projects/client/RabbitMQ.=
Client/src/client/impl/Frame.cs#l107</a><br>
<pre> if (type =3D=3D 'A')</pre>The local variable name which recie=
ves the value is "type", but it checks for "AMQP" which=
should not be expected and it fail to check for type in 1-4 range which sh=
ould be expected according to the spec. And it will keep reading "size=
" and "byte[size]" even though they can be a garbage.<br>
Am I missing something?<br><br>Vadim.<br clear=3D"all"><br>-- <br>From RFC =
2631: In ASN.1, EXPLICIT tagging is implicit unless IMPLICIT is explicitly =
specified<br>
--14dae93a122f5c3c9f04be749b1f--
More information about the rabbitmq-discuss
mailing list