[sr-dev] Crash - auth

Alex Balashov abalashov at evaristesys.com
Fri Oct 15 06:59:00 CEST 2010


It crashes with the current master HEAD too.

On 10/15/2010 12:17 AM, Alex Balashov wrote:

> On 10/15/2010 12:14 AM, Alex Balashov wrote:
>> I had the following code as a register handler:
>>
>> t_check_request();
>
> I meant t_lookup_request().
>
>>
>> if(!www_authorize("$td", "subscriber")) {
>>
>> switch($rc) {
>> case -1:
>> xlog(something about authentication error);
>> break;
>>
>> case -2:
>> xlog(something about invalid password);
>> send_reply("403", "Forbidden");
>> exit;
>>
>> case -3:
>> xlog(something about invalid user);
>> send_reply("403", "Forbidden");
>> exit;
>>
>> default:
>> xlog(something else)
>>
>> }
>>
>> www_challenge("$td", "1");
>> t_release();
>> exit;
>> }
>>
>>
>> It worked fine with the initial 3.1.0 tarball from last week. But it
>> crashes with the tarball that is on the website right now:
>>
>> Core was generated by `/usr/local/sbin/kamailio -P
>> /var/run/kamailio/kamailio.pid -m 64 -u root -g roo'.
>> Program terminated with signal 11, Segmentation fault.
>> #0 atomic_and_int (id=2116215340, p=128 '\200')
>> at ../../atomic/atomic_x86.h:227
>> 227 ../../atomic/atomic_x86.h: No such file or directory.
>> in ../../atomic/atomic_x86.h
>> (gdb) where
>> #0 atomic_and_int (id=2116215340, p=128 '\200')
>> at ../../atomic/atomic_x86.h:227
>> #1 otn_new (id=2116215340, p=128 '\200') at ot_nonce.c:196
>> #2 0xb6fe5bba in get_challenge_hf (msg=0x836a63c, stale=0,
>> realm=0xbffb0ad4,
>> nonce=0x0, algorithm=0x0, qop=0xb6fee9d0, hftype=13, ahf=0xbffb0acc)
>> at challenge.c:181
>> #3 0xb6fe3c4f in auth_challenge (msg=0x836a63c, p1=<value optimized out>,
>> p2=0x835fd8c "`\022\060\b\001", hftype=13) at auth_mod.c:613
>> #4 0x08059de4 in do_action (h=0xbffb2098, a=0x830453c, msg=0x836a63c)
>> at action.c:1099
>> #5 0x080615b0 in run_actions (h=0xbffb2098, a=0x8304498, msg=0x836a63c)
>> at action.c:1553
>> #6 0x0805a530 in do_action (h=0xbffb2098, a=0x830720c, msg=0x836a63c)
>> at action.c:1259
>> #7 0x080615b0 in run_actions (h=0xbffb2098, a=0x830720c, msg=0x836a63c)
>> at action.c:1553
>> #8 0x0805a61d in do_action (h=0xbffb2098, a=0x830787c, msg=0x836a63c)
>> at action.c:1084
>> #9 0x080615b0 in run_actions (h=0xbffb2098, a=0x8304090, msg=0x836a63c)
>> at action.c:1553
>> #10 0x0805a26c in do_action (h=0xbffb2098, a=0x82ea7d8, msg=0x836a63c)
>> at action.c:711
>> #11 0x080615b0 in run_actions (h=0xbffb2098, a=0x82ea7d8, msg=0x836a63c)
>> at action.c:1553
>> #12 0x0805a61d in do_action (h=0xbffb2098, a=0x82eb090, msg=0x836a63c)
>> at action.c:1084
>> #13 0x080615b0 in run_actions (h=0xbffb2098, a=0x82eb090, msg=0x836a63c)
>> at action.c:1553
>> #14 0x0805caff in do_action (h=0xbffb2098, a=0x82eb134, msg=0x836a63c)
>> at action.c:1088
>> #15 0x080615b0 in run_actions (h=0xbffb2098, a=0x82eb134, msg=0x836a63c)
>> at action.c:1553
>> #16 0x0805caff in do_action (h=0xbffb2098, a=0x82eb1d8, msg=0x836a63c)
>> ---Type <return> to continue, or q <return> to quit---
>> at action.c:1088
>> #17 0x080615b0 in run_actions (h=0xbffb2098, a=0x82e9124, msg=0x836a63c)
>> at action.c:1553
>> #18 0x0805a61d in do_action (h=0xbffb2098, a=0x82ebbb0, msg=0x836a63c)
>> at action.c:1084
>> #19 0x080615b0 in run_actions (h=0xbffb2098, a=0x82df70c, msg=0x836a63c)
>> at action.c:1553
>> #20 0x08061854 in run_top_route (a=0x82df70c, msg=0x836a63c, c=0x0)
>> at action.c:1626
>> #21 0x080d5866 in receive_msg (
>> buf=0x827e880 "REGISTER sip:sip.evaristesys.com SIP/2.0\r\nVia:
>> SIP/2.0/UDP
>> 208.52.173.7:5060;branch=z9hG4bK39b78214;rport\r\nMax-Forwards:
>> 32\r\nFrom: <sip:abalashov at sip.evaristesys.com>;tag=as4854d363\r\nTo:
>> <sip:abalasho"...,
>> len=678, rcv_info=0xbffb22dc) at receive.c:205
>> #22 0x0815b512 in udp_rcv_loop () at udp_server.c:532
>> #23 0x080a2917 in main_loop () at main.c:1554
>> #24 0x080a5142 in main (argc=13, argv=0xbffb2574) at main.c:2398
>>
>> I have not tried with sip-router:master:HEAD yet.
>>
>
>


-- 
Alex Balashov - Principal
Evariste Systems LLC
1170 Peachtree Street
12th Floor, Suite 1200
Atlanta, GA 30309
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the sr-dev mailing list