project-everest / mitls-fstar

Verified implementation of TLS 1.3 in F*
https://www.mitls.org
Other
173 stars 16 forks source link

miTLS client does not emit alert when encrypted handshakes are shuffled #176

Open oweisse-msft opened 7 years ago

oweisse-msft commented 7 years ago

The typical order of encrypted messages: encrypted_extensions; certificate; certificate_verify;finished; In this experiment the order was changed, though the record was encrypted properly. i. miTLS client emits no alert, while NSS client emits plaintext alert unexpected_message (which makes sense) ii. In response to NSS client emitting the plaintext alert unexpected_message, miTLS server emits encrypted fatal alert decryption_failed_RESERVED, potentially due to misinterpreting the client alert. iii. After sending decryption_failed_RESERVED, the miTLS server continues to send application data. This is a problem a fatal alert should cause a termination of the communication.

s-zanella commented 7 years ago

This is an interesting test! I assume this is a 1-RTT handshake. I think this explains what's going:

BarryBo commented 6 years ago

Assigning to you. Can you please check if this is still a bug? And if so, it should be caught and fixed during the verification push.