Repository navigation
tls: check the server Finished in TLS client - #5301
Merged
gpotter2 merged 1 commit intoNov 25, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5301 +/- ##
==========================================
+ Coverage 80.06% 80.67% +0.61%
==========================================
Files 375 375
Lines 98775 98879 +104
==========================================
+ Hits 79083 79772 +689
+ Misses 19692 19107 -585
🚀 New features to boost your workflow:
|
Member
|
Thanks for the PR, exceptionally I think the tests are not really useful. |
TLSFinished.post_dissection stores the verify_data check in finished_valid, but TLSClientAutomaton never read it and completed the handshake after an invalid server Finished. Abort with a decrypt_error alert, as TLSServerAutomaton already does for the client Finished. AI-Assisted: yes (Claude Opus 5.5)
musthaf-bughunter
force-pushed
the
tls-client-check-server-finished
branch
from
November 25, 2026 07:05
f2867cf to
c993b83
Compare
Contributor
Author
|
Fair enough, dropped them. Only the automaton_cli change is left now. |
gpotter2
approved these changes
Nov 25, 2026
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.
Description
TLSFinished.post_dissectionstores the verify_data check infinished_valid, butTLSClientAutomatonnever reads it:HANDLED_SERVERFINISHED(TLS <= 1.2) andTLS13_HANDLED_FINISHED(TLS 1.3, also reached on the PSK path without CertificateVerify) continue after an invalid server Finished. The server already rejects an invalid client Finished; RFC 5246 sect 7.4.9 and RFC 8446 sect 4.4.4 require the check on both sides.Against a server sending
TLSFinished(vdata=b"\x00" * 12), the client logsTLS: invalid Finished received, thenTLS handshake completed!and exchanges application data. The client now sends a decrypt_error alert and stops, as for the ServerKeyExchange signature and TLS 1.3 CertificateVerify.