This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

sctp.ppi m3ua dissector causes C Stack Overflow error when called from LUA

0

I'm using wireshark 2.2.3 in ubuntu.

When I try to call the dissector I always get an error. This is my code:

local sctp_payload_dissector_table = DissectorTable.get("sctp.ppi")
original_m3ua_dissector = sctp_payload_dissector_table:get_dissector(3) 
sctp_payload_dissector_table:add(3, tcap_time_proto)

When I then call it from the dissector function:

function tcap_time_proto.dissector(buffer,pinfo,tree)
  original_m3ua_dissector:call(buffer, pinfo, tree)

It fails.

Is there anything worng with my code?

Carlos.

asked 20 Jan '17, 03:20

csigueros's gravatar image

csigueros
6112
accept rate: 0%

edited 20 Jan '17, 05:36

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572

Can you provide the lua source file and the capture you're using for testing so others can attempt to replicate the issue, hopefully under a debugger?

(20 Jan '17, 03:29) grahamb ♦

I have tested this with the new 2.2.4 version. Same error.

This is the output in wireshark for any sctp message:

Frame 1: 246 bytes on wire (1968 bits), 246 bytes captured (1968 bits)
Ethernet II, Src: JuniperN_e6:e8:7f (00:05:85:e6:e8:7f), Dst: HewlettP_b3:fd:d0 (ec:b1:d7:b3:fd:d0)
Internet Protocol Version 4, Src: 10.80.11.55, Dst: 10.91.33.118
Stream Control Transmission Protocol, Src Port: 2905 (2905), Dst Port: 2905 (2905)
<Wireshark Lua fake item>
Lua Error: [string "/usr/lib/x86_64-linux-gnu/wireshark/plugins/2..."]:18: C stack overflow     
    [Expert Info (Error/Undecoded): Lua Error: [string "/usr/lib/x86_64-linux-gnu/wireshark/plugins/2..."]:18: C stack overflow]
        [Lua Error: [string "/usr/lib/x86_64-linux-gnu/wireshark/plugins/2..."]:18: C stack overflow]
        <Message: Lua Error: [string "/usr/lib/x86_64-linux-gnu/wireshark/plugins/2..."]:18: C stack overflow>
        [Severity level: Error]
        [Group: Undecoded]

Line 18 in the LUA script is:

 original_m3ua_dissector:call(buffer, pinfo, tree)
(27 Jan '17, 00:00) csigueros