[asterisk-bugs] [JIRA] (ASTERISK-23605) res_http_websocket: Race condition in shutting down websocket causes crash

Matt Jordan (JIRA) noreply at issues.asterisk.org
Thu May 22 11:52:59 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-23605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Jordan updated ASTERISK-23605:
-----------------------------------

    Target Release Version/s: 12.3.0

> res_http_websocket: Race condition in shutting down websocket causes crash
> --------------------------------------------------------------------------
>
>                 Key: ASTERISK-23605
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23605
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_http_websocket
>    Affects Versions: 12.1.1
>            Reporter: Matt Jordan
>            Assignee: Kinsey Moore
>      Target Release: 11.10.0, 12.3.0
>
>         Attachments: ws_backtrace.txt
>
>
> Note that this crash would also most likely occur in Asterisk 11.
> The crash occurs when a call to write to the websocket (via {{fwrite}}) is passed a NULL {{FILE *}}. We would typically only end up in that situation when we had previously shutdown the websocket and set {{session->f}} pointer to NULL.
> The core file shows this being the case as well:
> {noformat}
> 284        if (fwrite(frame, 1, header_size, session->f) != header_size) {
> (gdb) p frame
> $1 = <value optimized out>
> (gdb) p session->f
> $2 = (FILE *) 0x0
> (gdb) 
> {noformat}
> Backtrace is attached.



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



More information about the asterisk-bugs mailing list