[asterisk-bugs] [JIRA] (ASTERISK-25615) res_pjsip: Setting transport async_operations > 1 causes segfault on tls transports

George Joseph (JIRA) noreply at issues.asterisk.org
Mon Dec 14 06:48:33 CST 2015


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

George Joseph closed ASTERISK-25615.
------------------------------------

    Resolution: Fixed

> res_pjsip: Setting transport async_operations > 1 causes segfault on tls transports
> -----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-25615
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25615
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: pjproject/pjsip
>    Affects Versions: SVN, 13.6.0
>         Environment: Fedora 23 x86_64
> Asterisk from current 13 branch
> pjproject 2.4.5
>            Reporter: George Joseph
>            Assignee: George Joseph
>            Severity: Critical
>         Attachments: backtrace.txt, pjsip.conf, register.xml
>
>
> Originally reported issue:
> {quote}
> If async_operations is set greater than 1 on a tls transport, asterisk segfaults in pjproject just after the tls negotiation.
> Test scenario and backtrace attached.
> Use the Wiki Secure Calls page and contrib/scripts/ast_tls_cert script to create the keys and certs
> Then from the /etc/asterisk/keys directory, run: sipp localhost:41061 -sf ./register.xml -t l1 -tls_cert ./1175.crt -tls_key 1175.key -p 5061 -max_socket 10 -m 1 -s 1175 -ap fordst1175
> {quote}
> However, I can now reproduce this issue solely using pjsua for both client and server...
> Steps to reproduce (assuming pjproject-2.4.5):
> * Modify pjsip/src/pjsua-lib/pjsua_core.c:2279 to set async_cnt to 2.
> * Compile (no need to install)
> * Create suitable TLS keys and certificates for a server
> * Run 
> {code}pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu --use-tls --tls-ca-file ca.crt --tls-cert-file server.crt --tls-privkey-file server.key{code}
> * From another command prompt, run 
> {code}
> LD_LIBRARY_PATH=./pjsip/lib pjsip-apps/bin/pjsua-x86_64-unknown-linux-gnu --local-port 7070 --use-tls <<EOF
> S
> OPTIONS
> sips:bob at localhost:5061
> S
> OPTIONS
> sips:bob at localhost:5061
> q
> EOF
> {code}
> * The server side will segfault.
> NOTE:  You need to run more than 1 request on the same socket.  Just sending 1 OPTIONS and exiting won't cause the segfault.



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



More information about the asterisk-bugs mailing list