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

Kinsey Moore (JIRA) noreply at issues.asterisk.org
Fri Apr 25 08:31:19 CDT 2014


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

Kinsey Moore reassigned ASTERISK-23605:
---------------------------------------

    Assignee: Kinsey Moore

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