Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
crypto: throw on invalid authentication tag length#17825
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
tniessen commented Dec 22, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
tniessen commented Dec 22, 2017
cc @nodejs/crypto @willclarktech |
42d00bb to dc0f9f0Comparetniessen commented Jan 5, 2018
ping @nodejs/crypto |
tniessen commented Jan 6, 2018
ping @nodejs/tsc as this is a semver-major change |
src/node_crypto.cc Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer keeping the invalid tag_len in the message for debuggability, but it's not blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, done! :)
joyeecheung commented Jan 6, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
By the way, the original deprecation does not seem to appear in |
tniessen commented Jan 6, 2018
That's a good idea, I will open a PR. |
5a09d9f to 5debc52Comparetargos commented Feb 3, 2018
What is blocking this? |
tniessen commented Feb 4, 2018
5debc52 to 6ee8771Compare6ee8771 to 2e68afcComparetniessen commented Apr 13, 2018
tniessen commented Apr 13, 2018
@joyeecheung PTAL :) |
jasnell commented Apr 14, 2018
Failure in CI is unrelated. |
jasnell commented Apr 14, 2018
I'm going to land this but I'm not going to pull it in to 10.x |
Refs: #17523 PR-URL: #17825 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17825 Refs: #17523 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #17825 Refs: #17523 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]>
jasnell commented Apr 14, 2018
tniessen commented Apr 14, 2018
@jasnell Thank you, this was part of the 11.0.0 milestone and was not supposed to land on node 10 :) |
The current implementation performs limited checks only and silently ignores superfluous bytes of the authentication tag. This change makes setAuthTag throw when - the user-specified authTagLength does not match the actual tag length, especially when the authentication tag is longer than 16 bytes, and when - the mode is GCM, no authTagLength option has been specified and the tag length is not a valid GCM tag length. This change makes the conditional assignment in SetAuthTag unnecessary, which is replaced with a CHECK. Refs: nodejs#17825
The current implementation performs limited checks only and silently ignores superfluous bytes of the authentication tag. This change makes setAuthTag throw when - the user-specified authTagLength does not match the actual tag length, especially when the authentication tag is longer than 16 bytes, and when - the mode is GCM, no authTagLength option has been specified and the tag length is not a valid GCM tag length. This change makes the conditional assignment in SetAuthTag unnecessary, which is replaced with a CHECK. Refs: #17825 PR-URL: #20040 Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Yihong Wang <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Given that #17825 and #20039 have landed on master, this statement is no longer true. PR-URL: #21445 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This is a follow-up to #17566.
Refs: #17523
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
crypto