Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 7501] SIGBUS in emem_tree_insert32_array+0x94()

Date: Fri, 20 Jul 2012 18:33:10 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7501

Guy Harris <guy@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Guy Harris <guy@xxxxxxxxxxxx> 2012-07-20 18:33:09 PDT ---
(In reply to comment #0)
> Bus Error (core dumped)

Usually means "misaligned reference" on SPARC.

> -bash-4.1$ pstack core
> core 'core' of 27535:   /usr/sbin/tshark -r /var/tmp/test
>  fcee97a4 emem_tree_insert32_array (fa814ad8, a6f862, fa814a80, 1, 172e800,
> fe618000) + 94

That code is handed pointers to keys and assumes the pointer is pointing to a
32-bit integral quantity, and...

>  fd4ee9f8 dissect_reload_framing_message (965b20, ffbff44c, 0, 81, 0, fa814a80)
> + 350

...the reload dissector is passing a pointer *not* guaranteed to be aligned on
a 4-byte boundary.

> The same file works on intel.

x86 processors, by default (and always on pre-486), don't require alignment
(and I don't know whether any OS turns on the "require alignment" mode on 486
and later processors; I don't know of any that do).

> The same file works on sparc with Wireshark 1.4.11.

Wireshark 1.4.x doesn't have the RELOAD dissector, so the offending code isn't
in 1.4.x.  (1.6.x has the RELOAD dissector, but it doesn't have the offending
code, so 1.6.x shouldn't have this particular bug, either.)

Fix checked into the trunk, as rev 43880, and the 1.8.x branch, as rev 43881,
making a copy of the offending data into a g_mallocated buffer (which is
guaranteed to be sufficiently well aligned) and freeing it when done.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.