quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.87k stars 395 forks source link

Usage of constant value for GREASE transport parameter make quinn vulnerable to fingerprinting by quic transport parameters. #2057

Open mstyura opened 1 week ago

mstyura commented 1 week ago

Currently quinn uses constant value as GREASE reserved random parameter. https://github.com/quinn-rs/quinn/blob/9386cde871c750464073772409615e90344b80e9/quinn-proto/src/transport_parameters.rs#L303-L305

This make quinn client side users vulnerable to fingerprinting by predictable patterns during handshake. Thanks to ability to inject custom TLS backend like quinn-boring most of TLS handshake is configurable, except the content of quic transport parameters extension.

As a prevention actions I see the following steps:

  1. Generate random transport parameter, like it is done quic-go or quiche]: https://github.com/quinn-rs/quinn/pull/2058
  2. Make it optional: https://github.com/quinn-rs/quinn/pull/2061
  3. Implement permutation of transport parameters, like it is done in quiche: https://github.com/quinn-rs/quinn/pull/2066
Ralith commented 1 week ago

All three of those sound like nice improvements to me!

mstyura commented 17 hours ago

Correct me if I'm wrong, the general philosophy of library is not to provide an API which can potentially reduce default security & privacy while providing not clear benefits. So PRs to opt out grease & random permutation (no such PR, just potentially) are not welcomed? I'm ok with any decision, just basically asking should I close above-mentioned PR or not yet (rebase).