Skip to content
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

Fix a segmentation fault in 'call.cpp:2369: createAuthHeader' #503

Closed
wants to merge 14 commits into from

Conversation

MGoetzl
Copy link
Contributor

@MGoetzl MGoetzl commented Jan 6, 2021

The SegFault only happens if the SIPp reference to the authentication header (in our case [field2], see the attached 'fail.xml') is used (in the example 'fail.xml': echo [field2]) after or in the receive section of the REGISTER message which actually sends the authentication header. In this case "getMethod" returns 0x0 (see 'gdb.txt', also attached).
It was introduced by commit 6dd80fe by using the function 'src->getMethod()' instead of the variable 'method'.

fix_info.tar.gz

jeannotlanglois and others added 13 commits August 25, 2020 11:58
[Detailed feature documentation available upon request]
Gateway RTP/SRTP bit pattern testing support (SIPP-RTPCHECK-3.6)

This may require some addiitonal additions, like:
- more documentation
- checks whether this can be disabled/enabled properly and TLS is still optional

Thanks Jeannot Langlois (@jeannotlanglois) for the big effort.
…headers when performing lookups. (SIPp#465)

* Extract short_header logic into function
* Handle mixed header compactness
* Handle cases ordering of headers matters
* Minor cleanup
* Tweak get_compact_header_name

Issue SIPp#465, by Karn Saheb Karn (@Karn).
(Thanks for the fixes and the included test case.)
Instead: we add a check that we require the auto keyword.

Fixes: SIPp#485 and SIPp#486
@wdoekes
Copy link
Member

wdoekes commented Jan 12, 2021

So it crashes on <exec command="echo [field2]"/> ?

In that case the fix is not to calculate a different (wrong) hash, but do something else (return error?).

@wdoekes wdoekes added this to the 3.7 milestone Jan 12, 2021
@MGoetzl
Copy link
Contributor Author

MGoetzl commented Jan 19, 2021

So it crashes on <exec command="echo [field2]"/> ?

yes, it crashes because it will call "createAuthHeaderMD5" (auth.cpp:242) with "method" being a null pointer, whitch leads to the crash in "strlen(method)" (auth.cpp:281)

In that case the fix is not to calculate a different (wrong) hash, but do something else (return error?).

Ah, yes - true! I've updated the pull request accordingly. It returns an error in the calling function "createAuthHeader" (auth.cpp:145).

@wdoekes wdoekes changed the base branch from master to branch/3.6 October 25, 2021 09:21
@wdoekes wdoekes modified the milestones: 3.7, 3.6 Oct 25, 2021
wdoekes pushed a commit that referenced this pull request Oct 25, 2021
@wdoekes
Copy link
Member

wdoekes commented Oct 25, 2021

Closed by 010ee75. Thanks!

@wdoekes wdoekes closed this Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants