[asterisk-bugs] [JIRA] (ASTERISK-27339) [patch] Crash on ast_ssl_teardown when stopping.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Fri Oct 13 08:09:21 CDT 2017


Alexander Traud created ASTERISK-27339:
------------------------------------------

             Summary: [patch] Crash on ast_ssl_teardown when stopping.
                 Key: ASTERISK-27339
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27339
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_sip/TCP-TLS
    Affects Versions: 14.6.2, 13.17.2, 15.0.0
            Reporter: Alexander Traud
            Severity: Minor


[Review Request #1875|http://reviewboard.asterisk.org/r/1875/] introduced a possible crash in the module chan_sip. When {{tcptls:ast_tcptls_server_start}} was unable to create a TLS server (for example because chan_pjsip is using the same port), {{chan:sip:reload_config}} set the whole {{tls_cfg}} to {{NULL}}. However, {{tcptls:ast_ssl_teardown}} expects that this memory address is never {{NULL}}.

*Steps to Reproduce:*
1. set sip.conf and pjsip.conf to {{bindaddr=::}}
2. start Asterisk to reload those configuration files

The command-line interface (CLI) of Asterisk displays:
{code}
ERROR: tcptls.c: ast_tcptls_server_start: Unable to bind SIP TLS server to [::]:5061: Address already in use
ERROR: chan_sip.c: reload_config: TLS Server start failed. Not listening on TLS socket.
{code}

3. $ core stop when convenient

*Expected Result:*
Asterisk should quit.

*Actual Result:*
{code}
Thread 1 "asterisk" received signal SIGSEGV, Segmentation fault.
in ast_ssl_teardown (cfg=0x0) at tcptls.c:1345
1345		if (cfg->ssl_ctx) {
in unload_module () at chan_sip.c:35570
in modules_shutdown () at loader.c:617
in really_quit (num=0, niceness=SHUTDOWN_REALLY_NICE, restart=0) at asterisk.c:2222
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list