[Home]

Summary:ASTERISK-28532: Segfault at res_rtp_multicast.c:211 (function set_type)
Reporter:Martin Ledderboge (uc_mle)Labels:
Date Opened:2019-09-10 11:01:30Date Closed:2019-09-10 15:09:06
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_rtp_multicast
Versions:13.21.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 18.04Attachments:
Description:Asterisk will crash with a segmention fault on sending a multicast rtp stream.

In res_rtp_multicast at line 289 (multicast_rtp_new) the void pointer data is cast to ast_multicast_rtp_options*, but in fact it should be a char*.

Backtrace:
{noformat}
Thread 3 "asterisk" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 9502.9717]
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:198
198 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
(gdb) bt
#0  __strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:198
#1  0x00007fffb3284362 in set_type (multicast=<optimized out>, type=0x3332006369736162 <error: Cannot access memory at address 0x3332006369736162>) at res_rtp_multicast.c:211
#2  multicast_rtp_new (instance=0x7fffe4120bc0, sched=<optimized out>, addr=<optimized out>, data=0x7fff7ee5f380) at res_rtp_multicast.c:295
#3  0x00005555556bd7e5 in ast_rtp_instance_new (engine_name=engine_name@entry=0x7fff8bf547a0 "multicast", sched=sched@entry=0x0, sa=sa@entry=0x7fff7ee5f3d0, data=data@entry=0x7fff7ee5f380) at rtp_engine.c:468
#4  0x00007fff8bf54572 in multicast_rtp_request (type=<optimized out>, cap=<optimized out>, assignedids=0x0, requestor=0x7fffcc0a3510, data=<optimized out>, cause=0x7fff7ee5f704) at chan_multicast_rtp.c:156
#5  0x0000555555601823 in ast_request (type=0x7fffe417e3d8 "MulticastRTP", request_cap=request_cap@entry=0x7fffcc0188b8, assignedids=assignedids@entry=0x0, requestor=requestor@entry=0x7fffcc0a3510, addr=0x7fffe417e3f2 "basic/239.255.255.240:10001", cause=cause@entry=0x7fff7ee5f704) at channel.c:6274
#6  0x00007fff8747fa2d in dial_exec_full (chan=0x7fffcc0a3510, data=<optimized out>, peerflags=peerflags@entry=0x7fff7ee60290, continue_exec=continue_exec@entry=0x0) at app_dial.c:2521
{noformat}
Steps to reproduce, create a Lua dialplan extension with the following content:

~~~
{noformat}
extensions = {
   ['context'] ) {
       ['_150'] = function(context, extension)
           local snd = '/path/to/some/wavfile'
           app.dial('MulticastRTP/basic/239.255.255.240:'..tostring(port)..',60,tTwA('.. snd ..')'
       end;
   }
}
{noformat}
~~~
Comments:By: Asterisk Team (asteriskteam) 2019-09-10 11:01:30.982-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Kevin Harwell (kharwell) 2019-09-10 15:08:37.039-0500

_chan_multicast_rtp_ is marked deprecated, thus no longer supported.

Please use _chan_rtp_ instead.