tls: send the second request once in the post-handshake auth test - #5200
Open
glaziermag wants to merge 1 commit into
Open
glaziermag wants to merge 1 commit into
glaziermag wants to merge 1 commit into
Conversation
test_tls_client_native() handed REQS[1] to the client automaton twice, with send() and then with sr1(). The ssl_server thread answers the first copy and closes the connection while the client may still be sending its post-handshake Certificate; the second copy then fails with EPIPE in should_send_ClientData(), the automaton stops, and the queued 200 response is never read, so sr1() returns None. Seen on the macos-14 leg on master. Send the request once. AI-Assisted: yes (Claude Fable 5.1) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
test_tls_client_native()handsREQS[1]to the client automaton twice, withsend()and then withsr1()(scapy/test/scapy/layers/tls/tlsclientserver.uts
Lines 706 to 708 in e4742a5
ssl_serverthread reads one request, answers it and shuts the connection down (scapy/test/scapy/layers/tls/tlsclientserver.uts
Lines 664 to 674 in e4742a5
Certificate. That flight then lands on the shut-down socket and is answered with a RST, so the send of the second copy raisesBrokenPipeErrorinflush_records()undershould_send_ClientData()(scapy/scapy/layers/tls/automaton_cli.py
Lines 665 to 668 in e4742a5
200 Welcomerecord already queued on the socket is never read, sosr1()returnsNone.That is the
macos-14 3.14failure ofTesting TLS client against ssl.SSLContext server with TLS 1.3 and a post-handshake authenticationon master (AttributeError: 'NoneType' object has no attribute 'load'), e.g. https://github.com/secdev/scapy/actions/runs/35789038699/job/106956973992 and https://github.com/secdev/scapy/actions/runs/35743207536/job/106801186588; locally on macOS it fails about 1 run in 100. TheOSError: [Errno 57]traceback printed by the server thread in those logs isserver.shutdown()on the listening socket and appears in passing runs too.Sending the request once removes the write on the closed connection.
This message was written with the help of AI (Claude Fable 5.1).
🤖 Generated with Claude Code