[asterisk-bugs] [JIRA] (ASTERISK-29197) Crash in rewrite_route_set when Record-Route header is set

nappsoft (JIRA) noreply at issues.asterisk.org
Mon Dec 7 01:11:16 CST 2020


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

nappsoft closed ASTERISK-29197.
-------------------------------

    Resolution: Duplicate

Seems to be a duplicate of ASTERISK-29024 (however with a differnt/more severe outcome).

Attaching my patch to ASTERISK-29024

> Crash in rewrite_route_set when Record-Route header is set
> ----------------------------------------------------------
>
>                 Key: ASTERISK-29197
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29197
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip_nat
>    Affects Versions: 16.15.0
>            Reporter: nappsoft
>            Severity: Minor
>              Labels: patch
>         Attachments: res_pjsip_nat.diff
>
>
> I am observing some strange crashes in rewrite_uri with some packets which have a Record-Route header.
> This happens on systems communication with MS Teams, however it is not 100% reproducible, but seems to be sort of a race condition. (However: as I needed to hack a rewrite of the contact domain into the sources I can't say for sure whether this is an asterisk issue or an issue I've introduced myself...).
> However: maybe the described behavior makes sense to somebody? If you think it is a non-asterisk-issue simply close the report...
> Patch I use as workaround attached. (Note: the packet does only have a RECORD-ROUTE header set, no additional route header or so. But it seems like in this situation rewrite_uri would be called twice as the patch simply prevents the second call to rewrite_uri...:
>         if (rr) {
>                 uri = pjsip_uri_get_uri(&rr->name_addr);
>                 rewrite_uri(rdata, uri);
>                 res = 0;
>         }
>         if (dlg && !pj_list_empty(&dlg->route_set) && !dlg->route_set_frozen) {
>                    pjsip_routing_hdr *route = dlg->route_set.next;
>                    uri = pjsip_uri_get_uri(&route->name_addr);
>                    rewrite_uri(rdata, uri);
>                    res = 0;
>         }



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



More information about the asterisk-bugs mailing list