[asterisk-bugs] [JIRA] (ASTERISK-28534) Segmentation fault when there is no priority for an extension
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Fri Sep 27 08:35:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248169#comment-248169 ]
Friendly Automation commented on ASTERISK-28534:
------------------------------------------------
Change 12964 merged by Friendly Automation:
pbx: Prevent Realtime switch crash on invalid priority
[https://gerrit.asterisk.org/c/asterisk/+/12964|https://gerrit.asterisk.org/c/asterisk/+/12964]
> Segmentation fault when there is no priority for an extension
> -------------------------------------------------------------
>
> Key: ASTERISK-28534
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28534
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: PBX/pbx_config
> Affects Versions: 16.5.0
> Environment: CentOS Linux release 7.6.1810
> Kernel: 3.10.0-957.27.2.el7.x86_64
> Reporter: Timothy Vanderaerden
> Assignee: Unassigned
> Severity: Minor
>
> When there is no priority given for an extension Asterisk will crash with a Segmentation fault. The config below will cause this behavior.
> {code}
> exten => _30[X+]XXXXXXXX!,
> {code}
> This is of course bad configuration but it shouldn't cause a crash.
> Below you will find gdb backtrace.
> {code:title=gdb}
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/usr/lib64/libthread_db.so.1".
> Core was generated by `asterisk -U asterisk -g -c'.
> Program terminated with signal 11, Segmentation fault.
> #0 __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen-sse4.S:31
> 31 pcmpeqb (%rdi), %xmm1
> {code}
> And the relevant Asterisk coredump.
> {code:title=core-brief.txt}
> Thread 1 (Thread 0x7f759588b900 (LWP 1380)):
> #0 0x00007f75925df10f in __strlen_sse42 () at ../sysdeps/x86_64/multiarch/strlen-sse4.S:31
> #1 0x00000000005c606b in realtime_arguments_to_fields2 (file=0x646299 "config.c", lineno=3220, func=0x6724f0 <__PRETTY_FUNCTION__.18004> "realtime_arguments_to_fields2", filename=0x628614 "", value=0x0, name=0x7$
> #2 0x00000000005c606b in realtime_arguments_to_fields2 (ap=ap at entry=0x7ffec6949158, result=result at entry=0x7ffec6949140, skip=-1) at config.c:3220
> #3 0x00000000005cda43 in ast_load_realtime (family=family at entry=0x7f7548b072ab "extensions") at config.c:3318
> #4 0x00007f7548b05e2a in realtime_switch_common (table=table at entry=0x7f7548b072ab "extensions", context=context at entry=0x0, exten=exten at entry=0x7ffec694a9e0 "_30[X+]XXXXXXXX!", priority=priority at entry=0, mode=mod$
> #5 0x00007f7548b06923 in realtime_common (context=<optimized out>, exten=0x7ffec694a9e0 "_30[X+]XXXXXXXX!", priority=0, data=<optimized out>, mode=<optimized out>) at pbx_realtime.c:261
> #6 0x00007f7548b06b17 in realtime_exists (chan=<optimized out>, context=<optimized out>, exten=<optimized out>, priority=<optimized out>, callerid=<optimized out>, data=<optimized out>) at pbx_realtime.c:291
> #7 0x000000000051c704 in pbx_find_extension (chan=chan at entry=0x0, bypass=bypass at entry=0x3aabc30, q=q at entry=0x7ffec69497f0, context=context at entry=0x0, exten=exten at entry=0x7ffec694a9e0 "_30[X+]XXXXXXXX!", priority$
> #8 0x0000000000527475 in pbx_extension_helper (c=c at entry=0x0, con=con at entry=0x3aabc30, exten=exten at entry=0x7ffec694a9e0 "_30[X+]XXXXXXXX!", label=label at entry=0x7f753093bd43 "", callerid=callerid at entry=0x0, combi$
> #9 0x0000000000527685 in ast_findlabel_extension2 (c=c at entry=0x0, con=con at entry=0x3aabc30, exten=exten at entry=0x7ffec694a9e0 "_30[X+]XXXXXXXX!", label=label at entry=0x7f753093bd43 "", callerid=callerid at entry=0x0) a$
> #10 0x00007f7530937936 in pbx_load_config (config_file=0x7f753093dd70 <config> "extensions.conf") at pbx_config.c:1823
> #11 0x00007f7530939fbe in pbx_load_module () at pbx_config.c:2101
> #12 0x00007f753093bb2b in load_module () at pbx_config.c:2130
> #13 0x00000000004f9ed5 in start_resource (mod=mod at entry=0x34f9e70) at loader.c:1711
> #14 0x00000000004fa6de in start_resource_attempt (mod=0x34f9e70) at loader.c:1685
> #15 0x00000000004fa6de in start_resource_attempt (mod=0x34f9e70, count=0x7ffec694cdb0) at loader.c:1887
> #16 0x00000000004fd563 in load_modules (mod_count=0x7ffec694cdb0, resources=0x7ffec694cde0) at loader.c:1984
> #17 0x00000000004fd563 in load_modules (mod_count=<synthetic pointer>, load_order=0x7ffec694cdd0) at loader.c:2166
> #18 0x00000000004fd563 in load_modules () at loader.c:2379
> #19 0x0000000000438405 in main (isroot=<optimized out>, rungroup=<optimized out>, runuser=<optimized out>) at asterisk.c:4148
> #20 0x0000000000438405 in main (argc=<optimized out>, argv=<optimized out>) at asterisk.c:3919
> {code}
> I wasn't sure if I should include the full Asterisk coredump or if this is enough. Let me know if you need more.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list