[SR-Users] tsilo ts_store() causes segfault if method is not INVITE

Anthony Alba ascanio.alba7 at gmail.com
Tue Oct 10 11:01:12 CEST 2017


Thanks Federico. Unfortunately I won't be able to access this system
for two weeks. I will track this mailing list and if there is no
update I will reproduce and ping with a core.

Cheers!

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



More information about the sr-users mailing list