-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect truncated packets when handling extended option lengths
When parsing extending option lengths, verify that enough bytes are left in the packet. This fixes a panic that occured when a specially crafted truncated packet was processed. The TestInvalidMessageParsing was refactored to allow easy additions of such cases to the test suite. The bug was found with the help of go-fuzz (https://github.com/dvyukov/go-fuzz).
- Loading branch information
Showing
2 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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