[asterisk-bugs] [JIRA] (ASTERISK-27408) Identify causes and fix pjsip/resolver/srv/failover/in_dialog/transport_tcp

George Joseph (JIRA) noreply at issues.asterisk.org
Fri Nov 10 11:01:30 CST 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=239945#comment-239945 ] 

George Joseph commented on ASTERISK-27408:
------------------------------------------

There are actually 3 root cause issues...

The 503 response XML scenarios were missing a Content-Length header which is  required for TCP connections.
Fixed in https://gerrit.asterisk.org/#/c/7181/

The pjsip_find_msg function in sip_parser was returning PJ_SUCCESS when the required Content-Length header was missing.
https://gerrit.asterisk.org/#/c/7180/

After fixing those... we still have an issue in pjsip_distributor.
When we receive a 503, we remove the dialog object from the dialog_associations container BUT we continue using the same dialog object for the new INVITE.
When we get the 180 and 200 on the new INVITE, we don't find the dialog but there's a fallback.  Since these are responses, we can get the dialog from the request.
When we get a BYE, we still don't find the dialog but there's no fallback since this is a new request so we return a 481.

We could create a new dialog for the new request but a safer alternative is to just not delete the object from the container on a 503 when failover processing is in process.




> Identify causes and fix pjsip/resolver/srv/failover/in_dialog/transport_tcp
> ---------------------------------------------------------------------------
>
>                 Key: ASTERISK-27408
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27408
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Third-Party/pjproject
>    Affects Versions: GIT, 15.1.1
>            Reporter: Corey Farrell
>         Attachments: 0020-sip_parser-Add-validity-checking-for-numeric-header-.patch, fails.pcapng, works.pcapng
>
>
> With the recent security fix for the sip_parser, 2 of the resolver unbound tests fail.  
> transport_unspecified also fails but transport_udp passes.
> It's possible that the patch exposed some other issue.
> 2 pcaps attached



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



More information about the asterisk-bugs mailing list