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

detect and report TLS buffer overflows #504

Merged
merged 4 commits into from
Jan 9, 2024

Conversation

kazuho
Copy link
Member

@kazuho kazuho commented Dec 13, 2023

Up until now, when generating TLS messages, we have ignored the overflow of length fields. When they overflow, we have been sending length fields that contains the modulo of the actual length.

This does not happen in practice (as the endpoints control what they send in the handshake messages, which tend to be much smaller than the limits), and even if they fail the behavior is not harmful in sense that they end up in TLS handshake failures, but it is better to report them as errors.

Therefore, this PR adds such logic. A new error code is defined that would be reported to the application. The error code sent on wire will be Internal Error, which is the same error code that we send when running out of memory.

@kazuho kazuho merged commit b64735c into master Jan 9, 2024
13 checks passed
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.

1 participant