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

dtls_server: improve handling of unexpected messages during the handshake #9656

Open
gilles-peskine-arm opened this issue Oct 1, 2024 · 0 comments

Comments

@gilles-peskine-arm
Copy link
Contributor

The dtls_server sample program can detect MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE during the second or more handshake. This error can happen if the client sends a close_notify alert after the server has decided to close the connection, or if there's a duplicated packet from the first connection.

Since #9655, dtls_server reports MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE as not-really-an-error if it happens during a handshake. This downplays the error, which can definitely also be a legitimate error in the real world, if a non-DTLS or misbehaving client tries to connect to the server.

The goal of this issue is to improve the behavior or guidance in dtls_server, to allow users to make an informed decision on how to treat this error. This likely means being more discriminatory than “mbedtls_ssl_handshake returned MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant