engine: fix a possible crash exploit#172
Closed
RaphaelIT7 wants to merge 1 commit intoSource-Authors:masterfrom
Closed
engine: fix a possible crash exploit#172RaphaelIT7 wants to merge 1 commit intoSource-Authors:masterfrom
RaphaelIT7 wants to merge 1 commit intoSource-Authors:masterfrom
Conversation
Found this while working on my networking stuff
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.
Found this while working on my networking stuff, where I was overflowing the packetNumber causing lots of issues.


Making them unsigned should ensure that if they were negative for some reason, either they get still handled OR they hit one of the limits.
From testing around- anyone could have sent the malformed packet to a socket, and it would've crashed the server(probably worked on clients too) or could've been exploited further.
GMod & TF2 seems to have fixed this
as they internally use an unsigned int too.
Note
TF2 for example shows 255/shows the unsigned value unlike GMod which saved the signed value to display