[Home]

Summary:ASTERISK-26794: http: Crash on Reload Only in ast_tcptls_server_start
Reporter:Joshua Elson (joshelson)Labels:
Date Opened:2017-02-14 15:11:03.000-0600Date Closed:2017-02-16 11:13:40.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/HTTP
Versions:13.13.1 13.14.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) capathcrashfix.diff
( 1) crash-https-server.txt
( 2) http.conf
Description:Crash observed when issuing a FreePBX reload (only on a reload) with the attached backtrace.

100% reproducible on FreePBX with Asterisk 13.13.1 or 13.14.0 with mini http server enabled.
Comments:By: Asterisk Team (asteriskteam) 2017-02-14 15:11:03.854-0600

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].

By: Joshua Elson (joshelson) 2017-02-14 15:11:30.813-0600

Backtrace.

By: Joshua C. Colp (jcolp) 2017-02-14 15:36:22.166-0600

Can you attach the http.conf file for this?

By: Joshua Elson (joshelson) 2017-02-15 09:13:28.014-0600

http.conf attached.

By: Joshua Elson (joshelson) 2017-02-15 09:14:00.014-0600

Also, last lines of reload output before crash:

 == Parsing '/etc/asterisk/http.conf': Found
Bound HTTP server to address [::]:0
 == TLS/SSL ECDH initialized (secp256r1), faster PFS cipher-suites enabled
 == TLS/SSL certificate ok

By: Joshua Elson (joshelson) 2017-02-15 13:34:10.862-0600

Full repro:

Set the http.conf file as I had it. Start Asterisk.

Make any change to the http.conf setting (I was flipping enablestatic) and issue a core reload.

It will crash 100% of the time.

By: Joshua Elson (joshelson) 2017-02-15 14:42:46.052-0600

Aaaaand I had a few extra minutes to look at this.

Here's the lowest impact fix I can think of for this. Since the capath value is ignored anyway, just ensure it's defined when we define the http configuration and we won't crash.

By: Friendly Automation (friendly-automation) 2017-02-16 09:42:12.189-0600

Change 4960 merged by Joshua Colp:
http: Ensure capath is defined on all http creations

[https://gerrit.asterisk.org/4960|https://gerrit.asterisk.org/4960]

By: Friendly Automation (friendly-automation) 2017-02-16 10:35:02.948-0600

Change 4962 merged by Joshua Colp:
http: Ensure capath is defined on all http creations

[https://gerrit.asterisk.org/4962|https://gerrit.asterisk.org/4962]

By: Friendly Automation (friendly-automation) 2017-02-16 10:41:10.226-0600

Change 4963 merged by Joshua Colp:
http: Ensure capath is defined on all http creations

[https://gerrit.asterisk.org/4963|https://gerrit.asterisk.org/4963]