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

Fixed stack overflow in pico_dns_decompress_name #473

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

shachy12
Copy link

Hi,

I fixed the stack overflow in the function pico_dns_decompress_name.

In this function we had a buffer with a size of 256 bytes which is being filled inside a while loop.
The problem is that the break condition of this loop stops the loop only when reaching to a null terminator byte. An attacker can cause a stack overflow and possibly run an arbitrary code by sending a specially crafted packet.

Also, the functions pico_mdns_handle_data_as_answers_generic and pico_mdns_handle_single_question would have crashed if pico_dns_decompress_name returns NULL instead of an allocated buffer so I added a fix to them too.

@roel0
Copy link

roel0 commented Jul 14, 2017

Looks good! Merging..

@roel0 roel0 changed the base branch from master to development July 14, 2017 16:08
@roel0 roel0 merged commit faf924e into tass-belgium:development Jul 14, 2017
@shachy12 shachy12 deleted the mdns_stack_overflow_fix branch July 14, 2017 16:09
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

2 participants