disallow/skip url encoded CR and LF chars decoding#57
Open
yurunhub wants to merge 1 commit intosippy:masterfrom
Open
disallow/skip url encoded CR and LF chars decoding#57yurunhub wants to merge 1 commit intosippy:masterfrom
yurunhub wants to merge 1 commit intosippy:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have encountered the issue on very old version of sippy b2bua_radius, but I was also able to reproduce it on the latest version.
The main symptom is that b2bua<->radiusclient<->radius server pipeline gets somehow broken, after sippy tries to auth a call with CR-LF-CR-LF sequence in the CLD.
As a result, total mess may happen in the pipeline: radiusclient will "misunderstand" server and vice versa. Just to name a few things I observed: reject will be seen as accept, auth packet will be seen as acct packet, responses from 1 call somehow get into another call.
This sequence may get into CLD through urlencoded data.
Suggested fix/workaround is to skip CR/LF characters during urldecoding.
The fix has been tested with latest sippy code.
Example how to trigger the issue:
sipp -s '123#456%0D%0A%0D%0A' -m 1 192.168.1.99
Example with latest sippy what the issues looks like (RADIUS server is configured for always accept with same response)
1st few calls go ok:
Then accepts are treated as rejects, part of the response with routing is lost (not the worst possible outcome but I've seen worse like explained above):
After the suggested fix/workaround, the issue is not happening anymore: