willardf / Hazel-Networking

Hazel Networking is a low level networking library for C# providing connection-oriented, message-based communication via RUDP.
MIT License
385 stars 60 forks source link

Drop bad gcm records #17

Closed mendsley closed 3 years ago

mendsley commented 3 years ago

My current thinking is malformed (intentionally or not) application data packets could cause decrypted size to be negative if an application data packet is smaller than the GCM HMAC size.

Working on adding a unit test to verify this now

mendsley commented 3 years ago

Actually while reviewing this more, I don't believe this could happen - and is not likely the cause of the crash we're debugging

mendsley commented 3 years ago

I finally managed to create a test case to re-produce this