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: fixes for c-ares update to 1.21.0/1.22.0 #50743

Closed
wants to merge 5 commits into from

Conversation

bradh352
Copy link
Contributor

@bradh352 bradh352 commented Nov 15, 2023

c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string. Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP. This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fixes: #50741
Refs: #50444

Fix By: Brad House (@bradh352)

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Nov 15, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fixes: nodejs#50741
Refs: nodejs#50444

Fix By: Brad House (@bradh352)
@lpinca lpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 18, 2023
@lpinca
Copy link
Member

lpinca commented Nov 18, 2023

I think we should apply changes from #50444 and land everything as a single commit.

@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Nov 18, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/50743
✔  Done loading data for nodejs/node/pull/50743
----------------------------------- PR info ------------------------------------
Title      test: fixes for c-ares update to 1.21.0/1.22.0 (#50743)
Author     Brad House  (@bradh352)
Branch     bradh352:main -> nodejs:main
Labels     test, needs-ci
Commits    1
 - test: dns test case failures after c-ares update to 1.21.0+
Committers 1
 - Brad House 
PR-URL: https://github.com/nodejs/node/pull/50743
Fixes: https://github.com/nodejs/node/issues/50741
Refs: https://github.com/nodejs/node/pull/50444
Reviewed-By: Luigi Pinca 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50743
Fixes: https://github.com/nodejs/node/issues/50741
Refs: https://github.com/nodejs/node/pull/50444
Reviewed-By: Luigi Pinca 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 15 Nov 2023 14:37:45 GMT
   ✔  Approvals: 1
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/50743#pullrequestreview-1738469498
   ✘  This PR needs to wait 90 more hours to land (or 0 hours if there is one more approval)
   ✔  Last GitHub CI successful
   ✘  No Jenkins CI runs detected
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/6915944660

@lpinca lpinca added request-ci Add this label to start a Jenkins CI on a PR. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Nov 18, 2023
@lpinca
Copy link
Member

lpinca commented Nov 18, 2023

Applied the commit-queue label instead of request-ci.

@bradh352
Copy link
Contributor Author

should pull in 1.22.0 instead of 1.21.0 in #50444

@lpinca
Copy link
Member

lpinca commented Nov 18, 2023

The script to pull 1.22.0 should will run tomorrow. We can run it manually now but we have to reapply 0bd1e85.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 18, 2023
@nodejs-github-bot
Copy link
Collaborator

@lpinca
Copy link
Member

lpinca commented Nov 18, 2023

Shouldn't test/parallel/test-dns-resolveany.js fail at the moment? The c-ares version on main is 1.20.1.

@lpinca
Copy link
Member

lpinca commented Nov 18, 2023

Shouldn't test/parallel/test-dns-resolveany.js fail at the moment? The c-ares version on main is 1.20.1.

Nevermind, the server answers with a single string now.

I think we should apply changes from #50444 and land everything as a single commit.

There is no need to land this and the c-ares update as a single commit. This is independent.

Still LGTM.

Comment on lines 33 to 34
// May return EBADRESP or ETIMEOUT
// code: 'EBADRESP',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// May return EBADRESP or ETIMEOUT
// code: 'EBADRESP',
code: /^(?:EBADRESP|ETIMEOUT)$/,

@gjasny
Copy link

gjasny commented Nov 18, 2023

I think we should apply changes from #50444 and land everything as a single commit.

It would be helpful if the test fix is separate commit (but maybe same PR) and could also be backported to the v20 and v18 branch.
That would help me getting the fix into the Debian nodejs package.

Thanks,
Gregor

@nodejs-github-bot
Copy link
Collaborator

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 19, 2023
@lpinca lpinca added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Nov 19, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 19, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

lpinca pushed a commit that referenced this pull request Nov 24, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: #50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: #50741
Refs: #50444
@lpinca
Copy link
Member

lpinca commented Nov 24, 2023

Landed in 345d16c.

martenrichter pushed a commit to martenrichter/node that referenced this pull request Nov 26, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: nodejs#50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: nodejs#50741
Refs: nodejs#50444
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: nodejs#50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: nodejs#50741
Refs: nodejs#50444
RafaelGSS pushed a commit that referenced this pull request Nov 27, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: #50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: #50741
Refs: #50444
@RafaelGSS RafaelGSS mentioned this pull request Nov 28, 2023
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: #50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: #50741
Refs: #50444
RafaelGSS pushed a commit that referenced this pull request Nov 30, 2023
c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: #50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: #50741
Refs: #50444
@lpinca lpinca closed this Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dns test cases failures when upgrading to c-ares 1.21.0/1.22.0
5 participants