Skip to content

Restrict HTTP/2 TLS cipher suites - #13428

Merged
bneradt merged 1 commit into
apache:masterfrom
bneradt:restrict-h2-ciphers
Aug 3, 2026
Merged

Restrict HTTP/2 TLS cipher suites#13428
bneradt merged 1 commit into
apache:masterfrom
bneradt:restrict-h2-ciphers

Conversation

@bneradt

@bneradt bneradt commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

HTTP/2 can currently be negotiated with TLS 1.2 cipher suites that
RFC 9113 prohibits. Clients that enforce the restriction can reject
those connections instead of falling back to HTTP/1.1.

This checks the pending cipher during ALPN selection and removes
HTTP/2 when its IANA identifier is prohibited. This also adds AuTest
coverage for permitted negotiation and HTTP/1.1 fallback.

Fixes: #5287

HTTP/2 can currently be negotiated with TLS 1.2 cipher suites that
RFC 9113 prohibits. Clients that enforce the restriction can reject
those connections instead of falling back to HTTP/1.1.

This checks the pending cipher during ALPN selection and removes
HTTP/2 when its IANA identifier is prohibited. This also adds AuTest
coverage for permitted negotiation and HTTP/1.1 fallback.

Fixes: apache#5287
Copilot AI review requested due to automatic review settings July 25, 2026 02:08
@bneradt bneradt added this to the 11.0.0 milestone Jul 25, 2026
@bneradt bneradt self-assigned this Jul 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

tests/gold_tests/tls/tls_h2_cipher_suite.test.py:87

  • The prohibited-cipher test runs don’t declare an explicit dependency to start the ATS process (unlike the allowed-cipher run). This makes the ordering implicit and can be fragile if the harness ever reorders runs or if the first run fails before ATS is left running.
        tr = Test.AddTestRun(f"Fall back to HTTP/1.1 with a prohibited {description} cipher")
        tr.Processes.Default.Command = (
            "printf 'GET / HTTP/1.1\\r\\nHost: example.com\\r\\nConnection: close\\r\\n\\r\\n' | "
            f"openssl s_client -ign_eof -tls1_2 -cipher {cipher} "
            f"-alpn h2,http/1.1 -connect 127.0.0.1:{self._ts.Variables.ssl_port}")

@bneradt bneradt removed this from ATS v10.2.x Jul 30, 2026

// RFC 9113 Appendix A lists 276 prohibited TLS 1.2 cipher suites. The IANA
// identifiers for those suites form these 24 contiguous ranges.
static constexpr CipherRange prohibited_ranges[] = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masaori335 masaori335 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@bneradt
bneradt merged commit c052040 into apache:master Aug 3, 2026
15 checks passed
@bneradt
bneradt deleted the restrict-h2-ciphers branch August 3, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't allow blacklisted HTTP/2 ciphers to use HTTP/2

4 participants