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

dns: fix TTL value for AAAA replies to resolveAny() #25187

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. labels Dec 22, 2018
@addaleax addaleax added the dns Issues and PRs related to the dns subsystem. label Dec 22, 2018
@addaleax
Copy link
Member Author

@Trott
Copy link
Member

Trott commented Dec 23, 2018

Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19757/ ✔️

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 23, 2018
Copy link
Contributor

@XadillaX XadillaX left a comment

Choose a reason for hiding this comment

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

Wow! Well done!

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

LGTM, good catch.

@addaleax
Copy link
Member Author

Landed in d93f93a

@addaleax addaleax closed this Dec 26, 2018
@addaleax addaleax deleted the dns-fix branch December 26, 2018 13:45
addaleax added a commit that referenced this pull request Dec 26, 2018
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
targos pushed a commit that referenced this pull request Jan 1, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: nodejs#25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Jan 16, 2019
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
@zzz6519003
Copy link

Wow! Well done!

但觉厉 lol

BethGriggs pushed a commit that referenced this pull request Apr 17, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 28, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@BethGriggs BethGriggs mentioned this pull request May 1, 2019
BethGriggs pushed a commit that referenced this pull request May 10, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 16, 2019
We were previously reading from the wrong offset, namely
the one into the final results array, not the one for the
AAAA results itself, which could have lead to reading
uninitialized or out-of-bounds data.

Also, adjust the test accordingly; TTL values are not
modified by c-ares, but are only exposed for a subset
of all DNS record types.

PR-URL: #25187
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Khaidi Chu <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. cares Issues and PRs related to the c-ares dependency or the cares_wrap binding. dns Issues and PRs related to the dns subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants