Asterisk
  1. Asterisk
  2. ASTERISK-19202

CSipSimple (trunk) crushes Asterisk 1.8.8.1 (openSuse)

    Details

      Description

      When I try to make a call with CSipSimple over sips/srtp Aterisk crushes.
      The crush happens every time.
      The same setup works with Blink.

      1. backtrace.txt
        52 kB
        Catalin Sanda
      2. backtrace2.txt
        98 kB
        Catalin Sanda
      3. debug
        544 kB
        Catalin Sanda
      4. gdb.txt
        62 kB
        Catalin Sanda
      5. issueA19202_crypto_if_uninited_text_or_video.patch
        0.9 kB
        Walter Doekes

        Issue Links

          Activity

          Hide
          Catalin Sanda added a comment -

          Mea culpa.
          The stacktrace has some values optimized out. I'll try to recompile with the DONT_OPTIMIZE flag on and add a new backtrace.

          Show
          Catalin Sanda added a comment - Mea culpa. The stacktrace has some values optimized out. I'll try to recompile with the DONT_OPTIMIZE flag on and add a new backtrace.
          Hide
          Walter Doekes added a comment -

          p->rtp shouldn't be null there. Looks like either (a) memory was overwritten or (b) a different thread has been writing to p or (c) some function is in this short bit of code is setting rtp to null there.

          If possible please supply the full bt for the other threads and (thread apply all bt) and the incoming SDP message ('sip set debug on') and chan_sip debugging ('core set debug 5 chan_sip').

          Show
          Walter Doekes added a comment - p->rtp shouldn't be null there. Looks like either (a) memory was overwritten or (b) a different thread has been writing to p or (c) some function is in this short bit of code is setting rtp to null there. If possible please supply the full bt for the other threads and (thread apply all bt) and the incoming SDP message ('sip set debug on') and chan_sip debugging ('core set debug 5 chan_sip').
          Hide
          Paul Belanger added a comment -

          Thank you for your bug report. In order to move your issue forward, we require a backtrace[1] from the core file produced after the crash. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

          make install

          After enabling, reproduce the crash, and then execute the backtrace[1] instructions. When complete, attach that file to this issue report.

          [1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

          Show
          Paul Belanger added a comment - Thank you for your bug report. In order to move your issue forward, we require a backtrace [1] from the core file produced after the crash. Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then: make install After enabling, reproduce the crash, and then execute the backtrace [1] instructions. When complete, attach that file to this issue report. [1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace
          Hide
          Catalin Sanda added a comment -

          I'm attaching a new backtrace. Let me know if you need additional info.

          Show
          Catalin Sanda added a comment - I'm attaching a new backtrace. Let me know if you need additional info.
          Hide
          Matt Jordan added a comment -

          Catalin - the backtrace gives us a good place to work from - but can you also add the SIP trace? Either with a pcap from wireshark or from Asterisk with sip set debug on?

          Thanks, Matt

          Show
          Matt Jordan added a comment - Catalin - the backtrace gives us a good place to work from - but can you also add the SIP trace? Either with a pcap from wireshark or from Asterisk with sip set debug on? Thanks, Matt
          Hide
          Catalin Sanda added a comment -

          Please find attached the debug info.

          Show
          Catalin Sanda added a comment - Please find attached the debug info.
          Hide
          Walter Doekes added a comment -

          Patch issueA19202_crypto_if_uninited_text_or_video.patch should fix crash caused by this simple SDP:

          m=(video|text) 12345 RTP/(S)?AVP 97 96
          a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:abcdefghijklmnopqrstuvwxyz0123456789ABCD

          Prerequisites:

          loaded modules (besides res_rtp and chan_sip):
          > res_srtp.so

          sip.conf config:
          > allowguest=yes (default) OR an authenticated sip user!
          > textsupport=no (default) [for the "m=text" crash]
          > videosupport=no (default) [for the "m=video" crash]

          a couple of possible fixes/workarounds:
          > apply patch
          > unload res_srtp
          > enable both 'videosupport' and 'textsupport' in sip.conf

          Show
          Walter Doekes added a comment - Patch issueA19202_crypto_if_uninited_text_or_video.patch should fix crash caused by this simple SDP: m=(video|text) 12345 RTP/(S)?AVP 97 96 a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:abcdefghijklmnopqrstuvwxyz0123456789ABCD Prerequisites: loaded modules (besides res_rtp and chan_sip): > res_srtp.so sip.conf config: > allowguest=yes (default) OR an authenticated sip user! > textsupport=no (default) [for the "m=text" crash] > videosupport=no (default) [for the "m=video" crash] a couple of possible fixes/workarounds: > apply patch > unload res_srtp > enable both 'videosupport' and 'textsupport' in sip.conf
          Hide
          Walter Doekes added a comment -

          (P.S. 1.6.2.x and lower look unaffected. They don't do crypto and they're not touching p->trtp and p->vrtp in process_sdp without checking them against NULL.)

          Show
          Walter Doekes added a comment - (P.S. 1.6.2.x and lower look unaffected. They don't do crypto and they're not touching p->trtp and p->vrtp in process_sdp without checking them against NULL.)
          Hide
          Catalin Sanda added a comment -

          I applied the patch and now it works.
          Thanks a lot!

          Show
          Catalin Sanda added a comment - I applied the patch and now it works. Thanks a lot!

            People

            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development