No subject

Thu Feb 16 03:44:05 GMT 2012

explicitly specified

Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,<br>I&#39;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 &quot;uou do not have access to this servic=
e&quot;. Details do not matter, but in such case .net client will just kill=
 the client box instantly. Even mouse wont move.<br>
<br>I&#39;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=
Ampq-0.9.1 spec (paragraph 4.2.3=A0 General Frame Format) says:<br>&gt; 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=
<pre> if (type =3D=3D &#39;A&#39;)</pre>The local variable name which recie=
ves the value is &quot;type&quot;, but it checks for &quot;AMQP&quot; 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 &quot;size=
&quot; and &quot;byte[size]&quot; 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 =


More information about the rabbitmq-discuss mailing list