[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
Tue Dec 8 10:23:32 CST 2015


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

George Joseph updated ASTERISK-25615:
-------------------------------------

    Description: 
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 and install
* Create suitable TLS keys and certificates for a server
* Run {{ pjsua --use-tls --tls-ca-file ca.crt --tls-cert-file server.crt --tls-privkey-file server.key }}
* From another command prompt, run 
{{
pjsua --local-port 7070 --use-tls <<EOF
S
OPTIONS
sips:bob at localhost:5061
S
OPTIONS
sips:bob at localhost:5061
q
EOF
}}
* The first command will segfault.




  was:
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 and install
* Create suitable TLS keys and certificates for a server
* Run {{monospaced}} pjsua --use-tls --tls-ca-file ca.crt --tls-cert-file server.crt --tls-privkey-file server.key {{monospaced}}




> 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: 13.6.0
>         Environment: Fedora 23 x86_64
> Asterisk from current 13 branch
> pjproject 2.4
>            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 and install
> * Create suitable TLS keys and certificates for a server
> * Run {{ pjsua --use-tls --tls-ca-file ca.crt --tls-cert-file server.crt --tls-privkey-file server.key }}
> * From another command prompt, run 
> {{
> pjsua --local-port 7070 --use-tls <<EOF
> S
> OPTIONS
> sips:bob at localhost:5061
> S
> OPTIONS
> sips:bob at localhost:5061
> q
> EOF
> }}
> * The first command will segfault.



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



More information about the asterisk-bugs mailing list