Commit Graph

3 Commits

Author SHA1 Message Date
Rich Trott
1ee4703974
test: move net bytes-per-chunk test to sequential
The test is timing out on FreeBSD 10 in CI. It takes less than half as
long to run when it is in sequential on that platform instead of
parallel.

Refs: https://github.com/nodejs/node/pull/21322#issuecomment-399311718

PR-URL: https://github.com/nodejs/node/pull/21457
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-24 15:55:27 +02:00
Anna Henningsen
d362b07e78
test: move net bytes-per-chunk test to parallel
This was added in 3217e8e66f as
a regression test for a security patch. We moved it to
`sequential` to lower the risk of creating a flaky test,
because an earlier version of it was failing one some platforms.

There is no known reason why te test should be flaky in this form,
though, and moving it to parallel would be good because it does take
around 3 seconds that would otherwise fully count towards the
test run time.

PR-URL: https://github.com/nodejs/node/pull/21322
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-06-20 22:50:23 +02:00
Anna Henningsen
3217e8e66f
src: re-add Realloc() shrink after reading stream data
This would otherwise keep a lot of unused memory lying around,
and in particular add up to a page per chunk of memory overhead
for network reads, potentially opening a DoS vector if the resulting
`Buffer` objects are kept around indefinitely (e.g. stored in a list
and not concatenated until the socket finishes).

This fixes CVE-2018-7164.

Refs: https://github.com/nodejs-private/security/issues/186
Refs: 7c4b09b24b
PR-URL: https://github.com/nodejs-private/node-private/pull/128
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2018-06-12 20:46:15 -04:00