[Home]

Summary:ASTERISK-27046: res_pjsip_transport_websocket: segfault in get_write_timeout
Reporter:Jørgen H (jorgen)Labels:
Date Opened:2017-06-08 17:32:43Date Closed:2017-06-15 13:54:21
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_transport_websocket
Versions:14.5.0 Frequency of
Occurrence
Related
Issues:
Environment:linux x64Attachments:
Description:Segfault due to missing check for NULL return value when calling ast_sorcery_retrieve_by_id in function get_write_timeout.

Happens using Chromium 61, but not Firefox.. so depends on the client.
{noformat}
#0  get_write_timeout () at res_pjsip_transport_websocket.c:312
       __a = -1
       __b = <error reading variable __b (Cannot access memory at address 0x390)>
       transport = 0x0
       it_transport_states = {c = 0x7fc8f4001e18, last_node = 0x7fc8f4002290, complete = 0, flags = 0}
       transport_state = 0x1986a48
       write_timeout = -1
       transport_states = 0x7fc8f4001e18
#1  websocket_cb (session=0x7fc8f4013a08, parameters=<optimized out>, headers=<optimized out>) at res_pjsip_transport_websocket.c:349
       create_data = {transport = 0x7fc92dff4b00, ws_session = 0x1a91788}
       transport = <optimized out>
       read_data = {transport = 0x7fc8f4001e18, payload = 0x7fc8f4002290 "Hj\230\001", payload_len = 0}
       __PRETTY_FUNCTION__ = "websocket_cb"
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2017-06-08 17:32:44.522-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].