| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: nodejs#29108
Sorry, something went wrong.
| int main(int argc, char* argv[]) { | ||
| #endif // _WIN32 | ||
|
|
||
| v8::V8::SetFlagsFromString("--random_seed=42"); |
There was a problem hiding this comment.
IEEE 1149.5 specifies 4 as the random number.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
Hrm, looks like retrieval from the cache fails unless node is also started with --random_seed=42. The hash of the command line flags is part of the code cache's checksum. I can work around that by resetting --random_seed=0 just before creating the code cache. Not super elegant but it does the trick. It's interesting that snapshot creation is unaffected. |
Sorry, something went wrong.
|
also @nodejs/v8 |
Sorry, something went wrong.
|
Also /cc @nodejs/security @indutny just in case. Thought I don't see how the seed for static (i.e. shared across runs and public) cache generation should affect security (for the reasons stated in #29108). |
Sorry, something went wrong.
|
pummel/test-hash-seed: https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/8546/ |
Sorry, something went wrong.
@bnoordhuis Would I be correct to conclude from the above comments that this shouldn't land yet? |
Sorry, something went wrong.
|
@Trott I incorporated the necessary fixes. bnoordhuis/io.js@ed2c673 is the fix but the timestamp may be throwing off GH because it shows up before my comment. |
Sorry, something went wrong.
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: #29108 PR-URL: #29142 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Use a fixed random seed to ensure that the generated sources are identical across runs. The final node binary still reseeds itself on start-up so there should be no security implications caused by predictable random numbers (e.g., `Math.random()`, ASLR, the hash seed, etc.) Fixes: #29108 PR-URL: #29142 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
@bnoordhuis Yes, I can confirm that this fixes the issue. Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use a fixed random seed to ensure that the generated sources are
identical across runs.
The final node binary still reseeds itself on start-up so there should
be no security implications caused by predictable random numbers (e.g.,
Math.random(), ASLR, the hash seed, etc.)
Fixes: #29108