Skip to content

Backport the http header security patch from envoy 1.9.1#51

Merged
duderino merged 2 commits intoistio:release-1.0from
lambdai:ie-1.0.7
Apr 9, 2019
Merged

Backport the http header security patch from envoy 1.9.1#51
duderino merged 2 commits intoistio:release-1.0from
lambdai:ie-1.0.7

Conversation

@lambdai
Copy link

@lambdai lambdai commented Apr 5, 2019

Description:

http: fixed CVE-2019-9900 by rejecting HTTP/1.x headers with embedded NUL characters.
http: fixed CVE-2019-9901 by normalizing HTTP paths prior to routing or L7 data plane processing. This defaults off and is configurable via either HTTP connection manager normalize_path or the runtime.

Notes that in this PR the security feature is always enabled and no way to opt out. While in envoyproxy/envoy it is default off.

Risk Level:
MID

Testing:
Unit tests
Integration tests

Docs Changes:
Release Notes:
Bump istio/envoy version to 1.8.1. Notes that no such envoyproxy/envoy version number.

[Optional Fixes #Issue]
[Optional Deprecated:]

http: fixed CVE-2019-9900 by rejecting HTTP/1.x headers with embedded NUL characters.
http: fixed CVE-2019-9901 by normalizing HTTP paths prior to routing or L7 data plane processing. This defaults off and is configurable via either HTTP connection manager normalize_path or the runtime.
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
@istio-testing
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:

If they are not already assigned, you can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@duderino
Copy link

duderino commented Apr 5, 2019

@silentdai can you point how how the path normalization is enabled? I couldn't find it in this PR.

Thanks for sending this

@lambdai
Copy link
Author

lambdai commented Apr 5, 2019

@duderino I was lost in the context switch... Yes, I forgot to mention that istio/envoy choose to enable the feature. Will update the summary.

Copy link
Author

@lambdai lambdai left a comment

Choose a reason for hiding this comment

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

I could rename the maybeNormalizePath to avoid less confusion. But I don't see much benefit here. WDYT?

}

// Path sanitization should happen before any path access other than the above sanity check.
if (!ConnectionManagerUtility::maybeNormalizePath(*request_headers_)) {
Copy link
Author

Choose a reason for hiding this comment

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

@duderino The idea is that maybeNormalizePath is always executed in this PR.
In envoyproxy/envoy there is a branch to read from runtime as well as HCM config

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

@duderino Are you suggesting rename function as alwaysNormalizePath?

Copy link

Choose a reason for hiding this comment

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

nope, the function name is fine. I was just commenting that there was a mocked function that I think doesn't actually exist

@lambdai
Copy link
Author

lambdai commented Apr 8, 2019

@duderino gentle ping

@duderino duderino merged commit fb9e49c into istio:release-1.0 Apr 9, 2019
rlenglet pushed a commit that referenced this pull request Aug 13, 2019
While there, revert local changes to reduce the diff with upstream.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
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.

3 participants