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

test: fix test-https-ci-reneg-attack #25676

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 24, 2019

Refs: #25381 (comment)

First commit is just #25660. Once that and this land, then pummel tests should be working again. Please 👍 here to fast-track.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

With a recent OpenSSL update to core, a change in the behavior of
`s_client` result in pummel test failures because they spam with
renegotiation requests before the renegotiation is complete. Modify
tests to reduce initial spamming.

This fixes the TLS renegotiation test. While it fixes the bug in the
HTTPS test too, that is still failing with the OpenSSL update for other
(too-be-determined) reasons.

Refs: nodejs#25381 (comment)
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jan 24, 2019
@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label Jan 24, 2019
@Trott
Copy link
Member Author

Trott commented Jan 24, 2019

Custom pummel CI (same one that is now failing in node-daily-master because of the issues this fixes/works around): https://ci.nodejs.org/job/node-test-commit-custom-suites/837/

@Trott
Copy link
Member Author

Trott commented Jan 24, 2019

Unrelated failure in the CI run. Because pummel tests aren't run in regular CI, the lite CI should be sufficient. I'll now try to track down what caused the new pummel failure.

(Aside: As pummel tests fail and then are fixed, it's my hope to move them to sequential or parallel or create less pummel-y versions for those locations so that they stop breaking.)

@shigeki
Copy link
Contributor

shigeki commented Jan 24, 2019

I confirmed that openssl/openssl#8081 resolved this issue. I think it is better to backport it when it is accepted.

@Trott
Copy link
Member Author

Trott commented Jan 24, 2019

I confirmed that openssl/openssl#8081 resolved this issue. I think it is better to backport it when it is accepted.

I agree that is the much better fix. Until then, the test is failing in our nightly CI. Hopefully the patch is accepted in OpenSSL upstream very soon.

To fix the nightly CI, can we float the OpenSSL patch in Node.js immediately even though it's not in the OpenSSL code base yet? It should be a very low-risk thing to do, since it (I assume) only affects s_client and not anything used by the node binary.

@sam-github
Copy link
Contributor

I don't have strong feelings about whether this is important enough to violate our "don't land patches that haven't been accepted upstream". @shigeki 's fix is only 4 hours old, is it possible to disable the test for the week to give them a chance to accept.

I went through the git history. Since node has a .renegotiate() API, I was perplexed as to why we are using the client_s to do renegotiation. It looks to me that when @bnoordhuis added the ancestor of this test, we didn't yet have a renegotiate API. I think this test should be rewritten to use an in-process TLS/HTTPS client instead of the openssl client, fixing the bug and generally being an improvement.

@Trott Trott removed the fast-track PRs that do not need to wait for 48 hours to land. label Jan 24, 2019
@Trott
Copy link
Member Author

Trott commented Jan 24, 2019

Removing fast-track label as there's obviously question about whether this should land as-is.

I am definitely 👍 on the suggestion from @sam-github that the test use .renegotiate() instead of s_client. I'll hopefully PR that in some time when I can sit in front of a computer for more than 2 minutes, but if someone else beats me to it, even better.

Trott added a commit to Trott/io.js that referenced this pull request Jan 25, 2019
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: nodejs#25676 (comment)
@Trott
Copy link
Member Author

Trott commented Jan 26, 2019

Closing in favor of #25700 and #25720. (Those both need reviews, so feel free to head over there to get them landed and get the pummel test suite green again.)

@Trott Trott closed this Jan 26, 2019
Trott added a commit to Trott/io.js that referenced this pull request Jan 27, 2019
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: nodejs#25676 (comment)

PR-URL: nodejs#25700
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
addaleax pushed a commit that referenced this pull request Jan 28, 2019
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: #25676 (comment)

PR-URL: #25700
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
BethGriggs pushed a commit that referenced this pull request Apr 16, 2019
Rewrite test-tls-ci-reneg-attack to use tls.renegotiate() instead of
external (and potentially unpredictable/quirky/buggy) s_client.

Refs: #25676 (comment)

PR-URL: #25700
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@Trott Trott deleted the fix-https-reneg-test branch January 13, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants