Skip to content

Reject unoffered cipher suite in TLS 1.3 client - #3537

Open
spwalgren wants to merge 1 commit into
aws:mainfrom
spwalgren:client-cipher-fix
Open

spwalgren wants to merge 1 commit into
aws:mainfrom
spwalgren:client-cipher-fix

Conversation

@spwalgren

@spwalgren spwalgren commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The client only checked that the selected cipher was a TLS 1.3 cipher at the negotiated version, so a server could pick any TLS 1.3 cipher even when the client offered a restricted subset.

Also added UnsupportedCipherSuite-TLS13 runner test.

Context and motivation

The client only checked that the selected cipher was a TLS 1.3 cipher at the negotiated version, so a server could pick any TLS 1.3 cipher even when the client offered a restricted subset.

Description of changes

The client's cipher-suite validation now additionally requires that the selected cipher appear in the client's configured cipher list rather than checking protocol version alone.

Something to note: The default client configuration offers all supported TLS 1.3 ciphers so those handshakes are unaffected. Clients that configure their own ciphers can have handshakes fail.

Testing

Added UnsupportedCipherSuite-TLS13 to the runner suite and existing tls tests still pass.

Review considerations

Compatibility: Handshakes that previously succeeded will now fail when a server selects a TLS 1.3 cipher outside the client's configured list. This is the specified behavior and affects only non-conforming peers, but it is a behavior change for clients that both restrict their suites and talk to such a peer.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

The client only checked that the selected cipher was a TLS 1.3 cipher
at the negotiated version, so a server could pick any TLS 1.3 cipher
even when the client offered a restricted subset.

Also added UnsupportedCipherSuite-TLS13 runner test.
@spwalgren
spwalgren marked this pull request as ready for review September 16, 2026 21:37
@spwalgren
spwalgren requested a review from a team as a code owner September 16, 2026 21:37
@github-actions

Copy link
Copy Markdown
Contributor

🔒 Security Review — View Report

Please review before merging.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.20%. Comparing base (f3798b6) to head (0b1e900).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3537      +/-   ##
==========================================
- Coverage   78.41%   78.20%   -0.21%     
==========================================
  Files         700      700              
  Lines      125889   125886       -3     
  Branches    17413    17410       -3     
==========================================
- Hits        98711    98451     -260     
- Misses      26305    26563     +258     
+ Partials      873      872       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

2 participants