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

fix(s2n-quic-dc): wait to insert in peer map until handshake completes #2358

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

WesleyRosenblum
Copy link
Contributor

Resolved issues:

resolves #2314

Description of changes:

Currently, a dc path secret entry is inserted into both the Secret ID -> Entry map and the Socket Address -> Entry map at the same time (when dc stateless reset tokens are received). Since the dc handshake hasn't completed yet when this occurs, it is possible that the server may start encrypting with path secrets that the client is not yet aware of (as highlighted in #2314). This change splits the insertion of entries into the two maps into two operations, with the insertion into the Socket Address -> Entry map only occurring once the dc handshake has completed

Testing:

Updated existing testing

Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed? -->

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

@camshaft camshaft merged commit 01cbb44 into main Oct 30, 2024
130 checks passed
@camshaft camshaft deleted the WesleyRosenblum/dcrace branch October 30, 2024 00:43
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.

Avoid race condition with peer in server path secret map read
2 participants