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

docs: add citations for alert behavior #4198

Merged
merged 5 commits into from
Sep 15, 2023
Merged

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Sep 12, 2023

Description of changes:

s2n deviates from the RFC when handling alerts. The RFC calls for sending fatal alerts but s2n-tls defaults to sending close_notify alerts (which are level warning). This is intentional and and done to avoid potential side-channel attacks.

Since this is atypical behavior which often confuses new users, this PR adds duvet citations and expands on the comments to increase discoverability.

I also added a compliance comment for alert receiving behavior.

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.

@github-actions github-actions bot added the s2n-core team label Sep 12, 2023
@toidiu toidiu force-pushed the ak-alert_exceptions branch from 7a60770 to beb50d6 Compare September 12, 2023 21:02
@toidiu toidiu marked this pull request as ready for review September 12, 2023 21:06
@toidiu toidiu requested a review from goatgoose September 12, 2023 21:06
@toidiu toidiu requested a review from lrstewart September 14, 2023 23:22
tls/s2n_alerts.c Outdated
Comment on lines 231 to 236
/*
*= https://tools.ietf.org/rfc/rfc8446#section-6
*# Unknown Alert types MUST be treated as error alerts.
*
* All other alerts are treated as fatal errors.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

When a comment comes after the compliance comment I read it as a clarification of the compliance comment. Like "Unknown Alert types MUST be treated as error alerts, and all other alerts are treated as fatal errors." Like "other alerts" sounds like it means "other than unknown alert types". If it comes before it's clearer that's not true.

Suggested change
/*
*= https://tools.ietf.org/rfc/rfc8446#section-6
*# Unknown Alert types MUST be treated as error alerts.
*
* All other alerts are treated as fatal errors.
*/
/* All other alerts are treated as fatal errors.
*
*= https://tools.ietf.org/rfc/rfc8446#section-6
*# Unknown Alert types MUST be treated as error alerts.
*/

@toidiu toidiu force-pushed the ak-alert_exceptions branch from 6be17b7 to 83ec1ef Compare September 15, 2023 16:56
@toidiu toidiu enabled auto-merge (squash) September 15, 2023 16:56
@toidiu toidiu force-pushed the ak-alert_exceptions branch from 83ec1ef to ac02b26 Compare September 15, 2023 20:57
@lrstewart lrstewart disabled auto-merge September 15, 2023 21:00
@toidiu toidiu enabled auto-merge (squash) September 15, 2023 22:36
@toidiu toidiu merged commit e15bf7f into aws:main Sep 15, 2023
@toidiu toidiu deleted the ak-alert_exceptions branch July 11, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants