OpenSIPS / opensips

OpenSIPS is a GPL implementation of a multi-functionality SIP Server that targets to deliver a high-level technical solution (performance, security and quality) to be used in professional SIP server platforms.
https://opensips.org
Other
1.28k stars 581 forks source link

[BUG] Potential tology hiding bug due to RFC 6665 #2696

Closed dsandras closed 1 year ago

dsandras commented 2 years ago

OpenSIPS 2.4.x

We have the following setup:

With Ekiga, it works like a charm because Ekiga is using the old RFC 3665. With that old RFC, when the UA is building the route set, it uses the 200 OK answer to the initial SUBSCRIBE, then the route set is not changed anymore.

sip.js is implementing RFC 6665. With that RFC, the route set is built from the NOTIFY. Moreover, record routing is enabled in such NOTIFY requests.

In the attached PCAP (out-5-ko.pcap), you can use sip.Call-ID == "ingtt1173pt9bq2g68pp", and you will notice that the SUBSCRIBE request-URI is based on the Contact header in the NOTIFY (which is normal) and the SUBSCRIBE is sent to the first Route header built from the Record-Route in the NOTIFY (frames 3423 and 5150). There is no topology hiding.

In the other attached PCAP (out-5-ko.pcap), you can use sip.Call-ID == "uo7h7ttb8h7vto3r5c9g" as filter. You will notice:

From what I understood from the code, it happens because the Record-Route headers are not hidden in the NOTIFY we send to sipjs. Consequently, the SUBSCRIBE that is built by sipjs and sent to opensips has 2 Route headers, which disables topology hiding routing despite the fact the request URI has a thinfo parameter.

dsandras commented 2 years ago

https://www.ekiga.org/out-5-ok.pcap https://www.ekiga.org/out-5-ko.pcap

github-actions[bot] commented 2 years ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

github-actions[bot] commented 2 years ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

github-actions[bot] commented 2 years ago

Marking as closed due to lack of progress for more than 30 days. If this issue is still relevant, please re-open it with additional details.

dsandras commented 2 years ago

Can we reopen? It's still present.

Thanks

github-actions[bot] commented 2 years ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

github-actions[bot] commented 2 years ago

Marking as closed due to lack of progress for more than 30 days. If this issue is still relevant, please re-open it with additional details.

github-actions[bot] commented 2 years ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

github-actions[bot] commented 2 years ago

Marking as closed due to lack of progress for more than 30 days. If this issue is still relevant, please re-open it with additional details.

github-actions[bot] commented 1 year ago

Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days.

github-actions[bot] commented 1 year ago

Marking as closed due to lack of progress for more than 30 days. If this issue is still relevant, please re-open it with additional details.