GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — build: enable v8's SipHash for hash seed creation by rvagg · Pull Request #26367 · nodejs/node Conversation
Member
Triggers the V8_USE_SIPHASH to switch from the internal custom V8 hash seed generation function to an implementation of SipHash. Final step needed to clear up HashWick. Ref: #23259 This could arguably be semver-minor because it introduces a configure flag, but that doesn't show in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
devsnek
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
richardlau
approved these changes
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
refack
approved these changes
|
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ohh. We've been missing this with some of the other V8 new features...
/me writes himself a TODO note
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
does this warrant a patch bump? I don't know the rules there |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@targos ? P.S. Up till now we did bump |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
If I'm reading https://github.com/nodejs/node/pull/25430/files#diff-75477e7cdd271be767e5255488ca45e1 correctly, siphash is not enabled by default in V8. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@richardlau yes that's correct, I suspect because it'd be impractical, maybe impossible, to generate enough data to calculate the hash in a browser environment, especially now that they've got 64-bit seed length. It's slightly more practical when you have a server that will repeatedly answer you for hours on end. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm in favor of not bumping the patch level when only gypfiles are changed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hash flooding is not considered an vulnerability in the browser's threat model. A browser needs to deal with arbitrary, possibly malicious code, but does not care much about a tab locking up. An infinite loop is a lot simpler, with the same result. V8 does not use it by default, and since it's a build-time flag, does not ship the code. That's why I included the I got some numbers here. The current implementation is referred to as "implementation 1". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
For posterity: this could be just o['variables']['v8_use_siphash'] = b(options.without_siphash) but it's fine, it's still locally consistent.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
thanks for the tip, we could do a lot of simplification with that but I'll withhold this time
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we even need a ./configure flag?
IIUC this is an obscure enough configuration that doing:
./configure -- -Dv8_use_siphash=false
seems good enough
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It can be removed in a future version when someone's cleaning up. For now if it ends up causing problems, performance or backward compatibility, or whatever, at least they have an easy out
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the info @hashseed (and thanks for the hard work on this btw). I can get similar performance numbers using the benchmark in your doc with this turned on and off in Node, so at least I know it's enabled properly. I'm having a hard time finding anything in our benchmark suite that displays a meaningful difference though—there's a lot of I/O focus in our benchmarks and those that aren't I/O touch fairly deep code paths so are getting a lot of variety. Hopefully the overhead gets lost in the wash and will only hit a small subset of users. I've included the SipHash LICENSE in ours, unfortunately the CC0 text is 3 times the size of the code we're importing. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
IIUC CC0 is a "no-attribution no-copyright" license, which IMO makes explicitly including it counter productive.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
IIUC CC0 is more of a "no copyright" waiver then a license, and as such does not require explicit attribution - https://wiki.creativecommons.org/wiki/CC0_FAQ#Does_CC0_require_others_who_use_my_work_to_give_me_attribution.3F I think it should be removed from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've removed the CC0 but left attribution, because we're good open source citizens: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in e1cd8ac...0d94c23 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Triggers the V8_USE_SIPHASH to switch from the internal custom V8 hash seed generation function to an implementation of SipHash. Final step needed to clear up HashWick. PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Triggers the V8_USE_SIPHASH to switch from the internal custom V8 hash seed generation function to an implementation of SipHash. Final step needed to clear up HashWick. PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Notable Changes
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
#26367
* crypto:
* Add `KeyObject.asymmetricKeySize` (Patrick Gansterer)
#26387
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) #26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) #26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
#26527
Triggers the V8_USE_SIPHASH to switch from the internal custom V8 hash seed generation function to an implementation of SipHash. Final step needed to clear up HashWick. PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Notable Changes
* bootstrap:
* Add experimental `--frozen-intrinsics` flag (Guy Bedford)
#25685
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
#26367
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) #26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) #26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
#26527
Notable Changes
* bootstrap:
* Add experimental `--frozen-intrinsics` flag (Guy Bedford)
nodejs#25685
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
nodejs#26367
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
nodejs#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) nodejs#26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) nodejs#26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
nodejs#26527
Notable Changes
* bootstrap:
* Add experimental `--frozen-intrinsics` flag (Guy Bedford)
#25685
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
#26367
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) #26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) #26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
#26527
Notable Changes
* bootstrap:
* Add experimental `--frozen-intrinsics` flag (Guy Bedford)
#25685
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
#26367
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) #26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) #26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
#26527
Notable Changes
* bootstrap:
* Add experimental `--frozen-intrinsics` flag (Guy Bedford)
nodejs#25685
* build:
* Enable v8's siphash for hash seed creation (Rod Vagg)
nodejs#26367
* deps:
* Upgrade openssl to 1.1.1b (Sam Roberts)
nodejs#26327
* process:
* Make `process[Symbol.toStringTag]` writable again
(Ruben Bridgewater) nodejs#26488
* repl:
* Add `util.inspect.replDefaults` to customize the writer
(Ruben Bridgewater) nodejs#26375
* report:
* Rename `triggerReport()` to `writeReport()` (Colin Ihrig)
nodejs#26527
PR-URL: #26367 Refs: #23259 Refs: https://darksi.de/12.hashwick-v8-vulnerability/ Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
Enable the v8_use_siphash flag. This flag is enabled since Node.js v11.12.0 (2019-03-15), see linked PR, release notes, and the blog post detailing the attack. Ref: nodejs/node#26367 Ref: https://nodejs.org/gl/blog/release/v11.12.0/ Ref: https://darksi.de/12.hashwick-v8-vulnerability/
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.