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

1.31 backport: Relax recent SNI restrictions (#36950) #36997

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

howardjohn
Copy link
Contributor

This change is being backported as it is a bug-fix for a regression for a fix that was also applied to this branch. Merging this fixes the regression.

See istio/istio#53426. Istio has used underscores in their SNI since the beginning and it is critical to its functionality. Usage of underscores in SNI is a bit of a grey area in the RFCs, which are extremely under-specified wrt to what exactly is the allowed formats. However, the de-facto standard is to allow them, as virtually every TLS library does so (including, but not limited to, Golang, rustls, openssl, boringssl).

This PR loosens the restriction to additionally allow underscores.

Note the intent of the SNI restrictions was not RFC compliance, etc -- but rather to fix log
injection
attacks (putting ANSI escapes, HTML, etc) into logs. This change does not loosen the security properties we hoped to gain with the initial patch.

Signed-off-by: John Howard [email protected]
(cherry picked from commit 79ee342)

See istio/istio#53426. Istio has used
underscores in their SNI since the beginning and it is critical to its
functionality. Usage of underscores in SNI is a bit of a grey area in
the RFCs, which are extremely under-specified wrt to what exactly is the
allowed formats. However, the de-facto standard is to allow them, as
virtually every TLS library does so (including, but not limited to,
Golang, rustls, openssl, boringssl).

This PR loosens the restriction to additionally allow underscores.

Note the intent of the SNI restrictions was not RFC compliance, etc --
but rather to fix [log
injection](GHSA-p222-xhp9-39rc)
attacks (putting ANSI escapes, HTML, etc) into logs. This change does
not loosen the security properties we hoped to gain with the initial
patch.

Signed-off-by: John Howard <[email protected]>
(cherry picked from commit 79ee342)
tyxia
tyxia previously approved these changes Nov 5, 2024
@tyxia
Copy link
Member

tyxia commented Nov 5, 2024

@phlax Could you take a look?

@phlax phlax enabled auto-merge (rebase) November 5, 2024 20:08
phlax
phlax previously approved these changes Nov 5, 2024
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @howardjohn

@ggreenway ggreenway self-assigned this Nov 5, 2024
Copy link
Contributor

@ggreenway ggreenway left a comment

Choose a reason for hiding this comment

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

Please add changelog

auto-merge was automatically disabled November 5, 2024 21:19

Head branch was pushed to by a user without write access

@howardjohn howardjohn dismissed stale reviews from phlax and tyxia via 506ad70 November 5, 2024 21:19
Adds a release note for
envoyproxy#36950 (comment)

Signed-off-by: John Howard <[email protected]>
(cherry picked from commit db63605)
@phlax phlax enabled auto-merge (rebase) November 7, 2024 13:09
@phlax
Copy link
Member

phlax commented Nov 7, 2024

/retest flakey ext_authz example

@phlax phlax merged commit 4069a7e into envoyproxy:release/v1.31 Nov 7, 2024
8 checks passed
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.

4 participants