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 out-of-bound read for invalid XML #747

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

orgads
Copy link
Contributor

@orgads orgads commented Sep 8, 2024

In the given example, there is an invalid field:

To: sut <sip:[service]@[remote_ip]:"remote_port]>

There are no more quotes later. When we search for the terminating quote, nothing is found, so we skip to the end of the string. Then the loop continues, we have p++ and continue beyond the buffer.

Fixes #727.

@orgads
Copy link
Contributor Author

orgads commented Sep 8, 2024

@wdoekes should we also include \n in strcspn?

In the given example, there is an invalid field:
To: sut <sip:[service]@[remote_ip]:"remote_port]>

There are no more quotes later. When we search for the terminating
quote, nothing is found, so we skip to the end of the string. Then
the loop continues, we have p++ and continue beyond the buffer.

Fixes SIPp#727.
src/message.cpp Dismissed Show dismissed Hide dismissed
@orgads orgads merged commit 6154ab1 into SIPp:master Sep 10, 2024
7 checks passed
@orgads orgads deleted the fuzz-quote branch September 10, 2024 12:52
@orgads orgads added the bug label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SECURITY] heap-buffer-overflow in message.cpp
1 participant