Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No common ciphersuit when FFDHE and ECDHE ciphersuites are available on server and client using TLS 1.2 #1860

Closed
Taowyoo opened this issue Mar 20, 2024 · 4 comments

Comments

@Taowyoo
Copy link
Contributor

Taowyoo commented Mar 20, 2024

Bug description

When FFDHE and ECDHE ciphersuites are available on server and client when common version is TLS 1.2. Server will fail to choose common ciphersuite.

See:

// And key exchange groups
&& (!ecdhe_possible || suite.usable_for_kx_algorithm(KeyExchangeAlgorithm::ECDHE))
&& (!ffdhe_possible || suite.usable_for_kx_algorithm(KeyExchangeAlgorithm::DHE))
});

It is obvious that no suite cannot support DHE and ECDHE KeyExchangeAlgorithm at same time when ecdhe_possible and ffdhe_possible are true.

Need backport

versions:

  • 0.23
@Taowyoo
Copy link
Contributor Author

Taowyoo commented Mar 20, 2024

Created PR for fixing this: #1861

Notice, you could produce the error by revertting the fix code in src and run

cargo test --test api_ffdhe server_avoids_cipher_suite_with_no_common_kx_groups

@djc
Copy link
Member

djc commented Mar 20, 2024

Is this a regression (presumably from #1784), or has this been broken since the introduction of FFDHE support?

@Taowyoo
Copy link
Contributor Author

Taowyoo commented Mar 20, 2024

@djc After testing, it's a regression from #1784.
My testing branch:

@ctz
Copy link
Member

ctz commented Mar 21, 2024

https://crates.io/crates/rustls/0.23.3 was released yesterday containing the fix for this.

@ctz ctz closed this as completed Mar 21, 2024
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

No branches or pull requests

3 participants