<div dir="ltr">Hi,<div>thanks for catching it :)</div><div>I'll have a look at the code as soon as I can. Do you have by any chance the corefile of the crash?</div><div><br></div><div>Cheers,</div><div><br></div><div>Federico</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 7, 2017 at 2:59 AM, Anthony Alba <span dir="ltr"><<a href="mailto:ascanio.alba7@gmail.com" target="_blank">ascanio.alba7@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was modifying the routing blocks of the tsilo push notifications<br>
recipe from Federico Cabiddu and could cause a segfault in kamailio<br>
5.0.3 if due to misconfiguration an ACK reached ts_store().<br>
<br>
## modify <a href="https://www.kamailio.org/events/2015-KamailioWorld/Day2/20-Federico.Cabiddu-Kamailio-In-A-Mobile-World.pdf" rel="noreferrer" target="_blank">https://www.kamailio.org/<wbr>events/2015-KamailioWorld/<wbr>Day2/20-Federico.Cabiddu-<wbr>Kamailio-In-A-Mobile-World.pdf</a><br>
## various route blocks will lead to here<br>
## including ACK and INVITE...<br>
route[LOCALRELAY) {<br>
<br>
## ooops: did not check method is INVITE<br>
    t_relay();<br>
    ts_store();<br>
    $sht(vtp=>stored::$rU) = 1;<br>
    xlog("L_INFO", "stored transaction [$T(id_index):$T(id_label)] $fU<br>
=> $rU\n");<br>
## saw an ACK and caused segfault<br>
}<br>
<br>
If properly checked for INVITE: if (is_method("INVITE")) { /* do tsilo<br>
stuff */ } it works.<br>
<br>
I'm wondering whether ts_store() should/could be more defensive and<br>
show an error like "..not the right context for ts_store().." .<br>
<br>
Thanks for you thoughts.<br>
<br>
Anthony<br>
<br>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</blockquote></div><br></div>