[Home]

Summary:ASTERISK-23101: pjsip: crash when parsing scheme from SIP URI
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-01-06 11:29:02.000-0600Date Closed:2014-01-07 08:58:01.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) core.freepbxdev1-2014-01-06.backtrace.txt
Description:Backtrace attached.

{noformat}
#0  pjsip_uri_get_scheme (rdata=0xb7401954) at /usr/include/pjsip/sip_uri.h:260
260    return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri);
{noformat}

In the core file, the uri pointer is NULL:

{noformat}
(gdb) print uri
$1 = (const void *) 0x0
{noformat}
Comments:By: Matt Jordan (mjordan) 2014-01-06 14:57:50.741-0600


Note: from one of the crashes, the PJSIP rdata:

{noformat}
(gdb) print *rdata
$2 = {tp_info = {pool = 0xb7110290, transport = 0xa955ba4, tp_data = 0x0, op_key = {op_key = {internal__ = {
         0x0 <repeats 32 times>}, activesock_data = 0x0, user_data = 0x0}, rdata = 0x0}}, pkt_info = {timestamp = {
     sec = 1389041329, msec = 972},
   packet = "REGISTER sip:199.102.239.103 SIP/2.0\r\nVia: SIP/2.0/UDP 10.4.0.148:47804;branch=z9hG4bK1668306163;rport\r\nRoute: <sip:199.102.239.103:5060;lr>\r\nFrom: <sip:5002@199.102.239.103>;tag=2098478806\r\nTo: <sip:"..., zero = 0,
   len = 479, src_addr = {addr = {sa_family = 2}, ipv4 = {sin_family = 2, sin_port = 48314, sin_addr = {
         s_addr = 1668896586}, sin_zero = "\000\000\000\000\000\000\000"}, ipv6 = {sin6_family = 2,
       sin6_port = 48314, sin6_flowinfo = 1668896586, sin6_addr = {s6_addr = '\000' <repeats 15 times>, u6_addr32 = {
           0, 0, 0, 0}}, sin6_scope_id = 0}}, src_addr_len = 16,
   src_name = "74.87.121.99", '\000' <repeats 33 times>, src_port = 47804}, msg_info = {
   msg_buf = 0xa7d5094 "REGISTER sip:199.102.239.103 SIP/2.0\r\nVia: SIP/2.0/UDP 10.4.0.148:47804;branch=z9hG4bK1668306163;rport\r\nRoute: <sip:199.102.239.103:5060;lr>\r\nFrom: <sip:5002@199.102.239.103>;tag=2098478806\r\nTo: <sip:"...,
   len = 479, msg = 0xa7d616c, info = 0xa7d6870 "Request msg REGISTER/cseq=2000 (rdata0xa7d4ff4)", cid = 0xa7d656c,
   from = 0xa7d63a0, to = 0xa7d648c, via = 0xa7d622c, cseq = 0xa7d65bc, max_fwd = 0xa7d6634, route = 0xa7d62d0,
   record_route = 0x0, ctype = 0x0, clen = 0xa7d684c, require = 0x0, supported = 0x0, parse_err = {prev = 0xa7d60d0,
     next = 0xa7d60d0, except_code = 0, line = 0, col = 0, hname = {ptr = 0x0, slen = 0}}}, endpt_info = {mod_data = {
     0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa96c90c, 0x0 <repeats 25 times>}}}
{noformat}