-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIP Plugin - Failed registration causes segfault #2419
Comments
by the way, this behaviour is present when running Janus from MacOS, the details of which are above, and also get the same problem when running Janus v0.10.7 in a docker container, on Linux |
The stack trace is unfortunately useless: |
Ah, that's unfortunate. sofia-sip looks to be an abandoned project. I've installed that, as per the documentation from the janus build instructions and homebrew poured version v1.12.11. Looks like the last release of sofia-sip was 1.12.11 back in March '11. |
Actually scratch that, I managed to replicate this with SIPp as a fake registrar, which gave me this libasan output:
This definitely is us doing something wrong, as that line is
We're giving for granted that |
The above commit fixes it for me, please let me know if it works for you too. |
Stunned at how quick the turnaround on this was. Deployed master into our staging environment now, which is working perfectly. We'll pick up the v0.10.8 when it's tagged, so that we get the stable release. Thanks @lminiero for fixing this so quickly. |
… challenges (fixes meetecho#2419)
Hi,
So, not quite sure what information would be useful here but, I'm using the SIP plugin with Janus, and discovering that a registration, with invalid credentials is causing the gateway to segfault.
It seems to be depending on the response that comes from the proxy. I think I have replicated it using the SIP plugin demo page too.
I work for a VoIP communication provider myself and, the registration process that our proxy uses is as follows:
This seems to be a pattern used by a large number of VoIP companies. It looks to be the second 401 that is causing the issue.
The stack trace that I'm getting from lldb is as follows:
The error seems to happen between lines 5504 & 5506 of janus_sip.c (from the v0.10.7 release).
These three lines are as follows:
If I set a breakpoint on line 5504 (JANUS_LOG), the breakpoint is hit, and
auth
contains a valid Digest string. However, if I set a breakpoint on 5506, the application segfaults before it hits this line, with the stack trace above.I can see this code is only executed on a status of 401, or 407 back from the proxy and I suspect the lack of WWW-Authenticate header is partly responsible for this.
As a workaround, we've put another proxy inbetween our VoIP platform and Janus, and on receipt of a 401 with no WWW-Authenticate header, we convert this to a 403 Forbidden. However, I suspect it's a problem that may plague other users with other VoIP providers.
The text was updated successfully, but these errors were encountered: