[asterisk-bugs] [JIRA] (ASTERISK-20837) [patch] build_route fails to parse Record-Route headers longer than 255 characters

Corey Farrell (JIRA) noreply at issues.asterisk.org
Mon Dec 24 15:47:45 CST 2012


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

Corey Farrell commented on ASTERISK-20837:
------------------------------------------

I will be able to talk to the client on Dec26th to get permission to provide a call setup trace.  I'll likely need to submit that privately via the clients Digium contract.

The sip proxy closest to Asterisk combines the existing record-route's to one header, the only proxy it adds is itself. It seems to me this is allowed per RFC3261, end of page 29:
{quote}
   Multiple header field rows with the same field-name MAY be present in
   a message if and only if the entire field-value for that header field
   is defined as a comma-separated list (that is, if follows the grammar
   defined in Section 7.3).  It MUST be possible to combine the multiple
   header field rows into one "field-name: field-value" pair, without
   changing the semantics of the message, by appending each subsequent
   field-value to the first, each separated by a comma.
{quote}
                
> [patch] build_route fails to parse Record-Route headers longer than 255 characters
> ----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-20837
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20837
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/Interoperability
>    Affects Versions: 1.8.19.0
>            Reporter: Corey Farrell
>            Severity: Critical
>         Attachments: asterisk-large-rr-header.patch
>
>
> build_route copies each Record-Route header to char rr_copy\[256\].  When the header is longer than this it cuts parts off.  This causes the header to be parsed wrong and the call fails to connect.
> This issue was found when connecting with the SIP core of a large organization.  The SIP core provides a single Record-Route header with comma separated values.  My patch malloc's rr_copy to the exact length required for each header, freeing after each is processed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list