[sr-dev] 3.3 presence crash

Hugh Waite hugh.waite at crocodile-rcs.com
Wed Jun 13 21:13:34 CEST 2012


Hello,
I found an issue in presence yesterday which caused a crash in core_hash.

My issue was caused by sending a null string to core_hash which did not 
check that s1->s != NULL before doing some pointer arithmetic. (The fix 
to presence will be committed v soon!)

I see that core_hash has moved from /lib/kcore/hash_func.h (in 3.2) to 
/hashes.h but I think the algorithm is the same one. Maybe pua is 
passing a null or uninitialised string?

Regards,
Hugh


On 13/06/12 19:17, Juha Heinanen wrote:
> when doing jitsi presence tests, i also managed to get kamailio 3.3 to
> crash with core dump.  events leading to the crash were pua publish via
> xmlrpc, which resulted into punch of notifies, some of which sip proxy
> failed to deliver due to missing tcp connections.
>
> after generating the notifies, presence server crashed like this:
>
> #0  0x00007fa1e9b17f7b in core_hash () from /usr/lib/pres-serv/modules_k/pua.so
> #1  0x00007fa1e9b1933f in publ_cback_func ()
>     from /usr/lib/pres-serv/modules_k/pua.so
> #2  0x00007fa1ee59b907 in run_trans_callbacks_internal ()
>     from /usr/lib/pres-serv/modules/tm.so
> #3  0x00007fa1ee59ba19 in run_trans_callbacks ()
>     from /usr/lib/pres-serv/modules/tm.so
> #4  0x00007fa1ee5c36fa in local_reply () from /usr/lib/pres-serv/modules/tm.so
> #5  0x00007fa1ee5c4b30 in reply_received ()
>     from /usr/lib/pres-serv/modules/tm.so
> #6  0x000000000044fee5 in forward_reply ()
> #7  0x0000000000489180 in receive_msg ()
> #8  0x0000000000501a8c in receive_tcp_msg ()
> #9  0x0000000000502740 in tcp_read_req ()
> #10 0x0000000000503759 in handle_io ()
> #11 0x00000000004fe363 in io_wait_loop_epoll ()
> #12 0x0000000000504431 in tcp_receive_loop ()
> #13 0x00000000004f9920 in tcp_init_children ()
> #14 0x000000000045c9fb in main_loop ()
> #15 0x000000000045f29c in main ()
>
> it would be nice to get this fixed before 3.3 release.
>
> -- juha
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




More information about the sr-dev mailing list