ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] H.225/ASN1 problem

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Cvetan Ivanov <zezo@xxxxxxxxx>
Date: Fri, 02 Jun 2006 20:07:36 +0300


Kukosa, Tomas wrote:
You are right, I have found it too.
It will be fixed ASAP.

10x

while we are at it I found another issue with val_start in packet-ber


line 1528:


if (is_per_byte_aligned){
	BYTE_ALIGN_OFFSET(offset);
	offset+=length*8;
	val_start = offset>>3;

this leaves val_start pointing to the next element and breaks things badly.

If I exchange the 2 lines, the fast start dissector works fine again ;)


the patch looks like this:


@@ -1526,8 +1527,8 @@
                        /* align to byte */
                        if (is_per_byte_aligned){
                                BYTE_ALIGN_OFFSET(offset);
+                               val_start = offset>>3;
                                offset+=length*8;
-                               val_start = offset>>3;
                        }else{
                                guint8 *buff;
                                guint32 i = 0;



Best regards,

Cvetan

________________________________

Od: ethereal-dev-bounces@xxxxxxxxxxxx za uživatele Cvetan Ivanov
Odesláno: pá 2.6.2006 17:32
Komu: Ethereal development
Předmět: Re: [Ethereal-dev] H.225/ASN1 problem



Hello,

The problem seems to be in the per decoder, probably
dissect_per_octet_string

in the case
         } else if ((min_len==max_len)&&(min_len<65536)) {  /* 16.7 if
length is fixed and less than to 64k*/
...
                 if (is_per_byte_aligned){
                         BYTE_ALIGN_OFFSET(offset);

val_start is not updated, and if the offset was not aligned from the
start, val_start points to the previous byte

                 if (is_per_byte_aligned){
                         BYTE_ALIGN_OFFSET(offset);
+                       val_start = offset>>3;
                         val_length = min_len;
                         offset+=min_len*8;

seems to fix it, but it would be better if somewone with deeper knolwdge
about packet-ber takes a look at it

btw it would be nice to replace "per_aligment_type_callback" with
"per_alignment_type_callback" in the sources


Cvetan Ivanov wrote:
Hello,

While trying few captures with the current svn, I noticed that ip
addresses and GUIDs are decoded incorrectly.

example:

we have source signall address element that looks like this:

00 01 02 03 04 05 06

where 0 means ipAddress and the IP should be 1.2.3.4 port 0x0506
but it's decoded instead as 0.1.2.3 port 0x0506

the same thing goes for the CallIdentifier -

00 01 02 .... (17 bytes) is decoded like guid 000102..., and it should
be 010203...

Tested on two different linux systems. Unfortunatrly I'm not too much
into asn1 and don't have idea how to debug this further.


best regards,

Cvetan


--
Cvetan Ivanov
System Administrator
SpectrumNet Jsc.
+35929657613 Office
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev




------------------------------------------------------------------------

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

--
Cvetan Ivanov
System Administrator
SpectrumNet Jsc.
+35929657613 Office
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev