Skip to content

Check the size of PROTMESSID_ACKN messages#302

Merged
corrados merged 1 commit intojamulussoftware:masterfrom
atsampson:acknsize
May 28, 2020
Merged

Check the size of PROTMESSID_ACKN messages#302
corrados merged 1 commit intojamulussoftware:masterfrom
atsampson:acknsize

Conversation

@atsampson
Copy link
Copy Markdown
Contributor

The Evaluate* functions that parse other types of messages all check the body size before starting to read data, but the special code for acknowledgements didn't do this, so an ACKN message on an existing connection that had a valid checksum but no body would result in an out-of-bounds read.

Found by fuzzing the protocol parser with afl-fuzz, using messages from CTestbench as an initial corpus and disabling the CRC check. This was the only problem it found in a 24h fuzzing run.

The Evaluate* functions that parse other types of messages all check the
message size before starting to read data, but the special code for
acknowledgements didn't do this, so an ACKN message on an existing
connection that had a valid checksum but no data would result in an
out-of-bounds read.

Found by fuzzing with afl-fuzz.
@corrados
Copy link
Copy Markdown
Contributor

Very good that you found it. Thank you!

@corrados corrados merged commit 64c4eb4 into jamulussoftware:master May 28, 2020
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.

2 participants