0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

6808 Commits

Author SHA1 Message Date
Ben Noordhuis
2c13cbbc0b crypto: fix uninitialized memory access in openssl
ASN1_STRING_to_UTF8() passes an ASN1_STRING to ASN1_STRING_set() but forgot to
initialize the `length` field.

Fixes the following valgrind error:

  $ valgrind -q --track-origins=yes --num-callers=19 \
      out/Debug/node test/simple/test-tls-client-abort.js
  ==2690== Conditional jump or move depends on uninitialised value(s)
  ==2690==    at 0x784B69: ASN1_STRING_set (asn1_lib.c:382)
  ==2690==    by 0x809564: ASN1_mbstring_ncopy (a_mbstr.c:204)
  ==2690==    by 0x8090F0: ASN1_mbstring_copy (a_mbstr.c:86)
  ==2690==    by 0x782F1F: ASN1_STRING_to_UTF8 (a_strex.c:570)
  ==2690==    by 0x78F090: asn1_string_canon (x_name.c:409)
  ==2690==    by 0x78EF17: x509_name_canon (x_name.c:354)
  ==2690==    by 0x78EA7D: x509_name_ex_d2i (x_name.c:210)
  ==2690==    by 0x788058: ASN1_item_ex_d2i (tasn_dec.c:239)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
  ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
  ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
  ==2690==    by 0x787C93: ASN1_item_d2i (tasn_dec.c:136)
  ==2690==    by 0x78F5E4: d2i_X509 (x_x509.c:141)
  ==2690==    by 0x7C9B91: PEM_ASN1_read_bio (pem_oth.c:81)
  ==2690==    by 0x7CA506: PEM_read_bio_X509 (pem_x509.c:67)
  ==2690==    by 0x703C9A: node::crypto::SecureContext::AddRootCerts(v8::Arguments const&) (node_crypto.cc:497)
  ==2690==  Uninitialised value was created by a stack allocation
  ==2690==    at 0x782E89: ASN1_STRING_to_UTF8 (a_strex.c:560)
2012-08-15 02:15:47 +02:00
Ben Noordhuis
bcb5bdebe7 test: raise pummel/test-net-throttle write req size
pummel/test-net-throttle assumes that a couple of big write requests result in
some of them getting queued because the kernel's send buffer fills up.

Said assumption breaks on systems with large send buffers. Raise the size of
the write request to ameliorate the issue.

This is a back-port of commit 6770555 from the master branch.
2012-08-14 23:11:28 +02:00
Ben Noordhuis
786e1e8712 buffer, crypto: fix buffer decoding
Before this commit, DecodeWrite() mistakenly tried to convert buffers to
UTF-8 strings which:

  a) produced invalid character sequences when the buffer contained
     octets > 127, and
  b) lead to spurious test failures because DecodeWrite() wrote less bytes
     than DecodeBytes() said it would, with the remainder either containing
     zeros or garbage

Fix that by simply copying the buffer's data to the target buffer when the
encoding is BINARY or by converting the buffer to a binary string when it's
UTF8 or ASCII.

Fixes #3651, #3866.
2012-08-14 23:00:09 +02:00
Ben Noordhuis
100e163dda build: compile with -fno-tree-vrp when gcc >= 4.0 2012-08-13 15:33:27 +02:00
Ben Noordhuis
9f26130a0e deps: upgrade libuv to 2c3e8b6 2012-08-13 15:33:27 +02:00
Ben Noordhuis
6b18e88b68 tls: handle multiple CN fields when verifying cert
Fixes #3861.
2012-08-12 21:48:26 +02:00
Kyle Robinson Young
4ef808ec0a doc: remove unused util from child_process 2012-08-12 00:08:43 +02:00
Nathan Rajlich
64ac54a64d Makefile: add a better check to ensure a node "release"
Closes #3841.
Closes #3842.
2012-08-09 17:11:41 -07:00
isaacs
c82e2889e8 blog post for 0.8.6 2012-08-07 12:05:23 -07:00
isaacs
e8bc2edabf Now working on 0.8.7 2012-08-07 12:02:49 -07:00
isaacs
e8834dc1a1 Merge branch 'v0.8.6-release' into v0.8 2012-08-07 12:02:38 -07:00
isaacs
0544a586ca 2012.08.07, Version 0.8.6 (Stable)
* npm: Upgrade to v1.1.48

* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich)

* zlib: Emit 'close' on destroy(). (Dominic Tarr)

* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon)

* installer: prevent ETXTBSY errors (Ben Noordhuis)

* installer: honor --without-npm, default install path (Ben Noordhuis)

* net: make pause work with connecting sockets (Bert Belder)

* installer: fix cross-compile installs (Ben Noordhuis)

* net: fix .listen({fd:0}) (Ben Noordhuis)

* windows: map WSANO_DATA to UV_ENOENT (Bert Belder)
2012-08-07 11:56:58 -07:00
isaacs
f11a3dfcd6 npm: Upgrade to 1.1.48
Fixes an issue with publishing readmes that are not called
'README.md', so that they still end up on the website
2012-08-06 19:09:58 -07:00
Nathan Rajlich
093be8b16b install: prevent a KeyError from being thrown when PORTABLE is not set 2012-08-06 13:22:05 -07:00
isaacs
caf69aa91a npm: Upgrade to 1.1.47 2012-08-06 13:07:31 -07:00
isaacs
9badc002b4 uv: Upgrade to dfb6be0 2012-08-06 12:40:40 -07:00
Nathan Rajlich
a23df7710a Merge branch 'binary-tarballs' into v0.8 2012-08-06 12:25:45 -07:00
Nathan Rajlich
cc6034ac86 email-footer: add links to the expected common binary packages
We can do other OSs like 32 and 64-bit OS X, but we should encourage
users to use the installer on OS X so we'll omit it here.
2012-08-06 11:57:47 -07:00
Nathan Rajlich
dc818135a5 Makefile: move the release verification logic into a make release-only target 2012-08-06 11:41:45 -07:00
Nathan Rajlich
8b11f29cf3 Makefile: properly set the ARCH variable when forcing a DESTCPU 2012-08-06 11:40:44 -07:00
Nathan Rajlich
dc9ae01ef7 Makefile: allow the dest-cpu to be specified for make binary
Needed for 64-bit Solaris, and 32-bit OS X
2012-08-06 11:40:44 -07:00
Nathan Rajlich
eadc2ec5c8 Makefile: add make binary helper target 2012-08-06 11:40:39 -07:00
Nathan Rajlich
bd10bf4418 Makefile: add make tar helper target 2012-08-06 11:40:01 -07:00
Nathan Rajlich
42aac41b93 Makefile: add target for precompiled binary tarballs
This target compiles node with "/" as the prefix and installs into a directory
like: "node-v0.8.6-darwin-x86_64". Then it creates a gzipped-tarball of that
directory, called something like: "node-v0.8.6-darwin-x86_64.tar.gz".
2012-08-06 10:22:08 -07:00
Nathan Rajlich
7a9db6cfb1 install: add a "portable" mode to the shebang-rewriting logic
This "portable" mode rewrites the npm shebang to use the "node" executable
in the same directory relative to the "npm" script. This makes the "npm"
script "just work" even when "node" is not in the user's $PATH.

This mode is necessary for the precompiled binary packages that may potentially
be extracted to anywhere. The regular shebang-rewriting logic would normally
set the npm script's shebang to "/bin/node" which will not be present on anyone's
machine. In the end, we want the precompiled packages to be as user-friendly as
possible.
2012-08-06 10:18:27 -07:00
Nathan Rajlich
6bdd4d0205 install: install the "wafadmin/Tools" files into the correct dir
Previously they were going into just "wafadmin" and node-waf wasn't working.
2012-08-06 10:16:09 -07:00
Kyle Robinson Young
bc7479d232 doc: fix typos in child_process 2012-08-06 00:13:56 +02:00
isaacs
4ff56aa15e doc: util.pump is deprecated. Use Stream.pipe 2012-08-05 14:47:23 -07:00
isaacs
7bb814f9db errnoException must be done immediately 2012-08-05 14:42:22 -07:00
isaacs
93be4ffd4b test-message: fix message output
1. The net changes add a stack frame to stdin errors.
2. The error line numbers were overly strict in many places.
2012-08-05 14:33:23 -07:00
Nathan Rajlich
3254caceef install: use os.path.join() to create the npm shebang
Prettier formatting for the shebang if the "prefix" ends with a /
2012-08-05 14:02:30 -07:00
Dominic Tarr
f4a4ef7a2d zlib: Emit 'close' on destroy(). 2012-08-04 13:04:15 -07:00
Tyler Neylon
b48684c6f1 child_process: Fix stdout=null when stdio=['pipe']
Previously, a command with a short stdio array would result in the child's
stdout and stderr objects set to null. For example:

var c = child_process.spawn(cmd, args, {stdio: ['pipe']});
// results in c.stdout === null.

The expected behavior is the above line functioning the same as this one:

var c = child_process.spawn(cmd, args, {stdio: ['pipe', null, null]});
// provides correct (non-null) c.stdout; as does the above, after this fix.
2012-08-04 11:30:58 -07:00
isaacs
a7f3288a87 blog post for 0.6.21 2012-08-04 11:30:44 -07:00
Nathan Rajlich
57f785151a install: install the "wafadmin" files into the correct directory
Before they were just being copied into "lib/node/".
Now they go into "lib/node/wafadmin/".
2012-08-04 00:10:58 -07:00
Ben Noordhuis
110e499fe7 installer: prevent ETXTBSY errors
The installer does what amounts to `cp -p`. If the node binary is in use at
the time of the copy, it'd fail with a ETXTBSY error. That's why it's unlinked
first now.
2012-08-04 02:41:34 +02:00
Ben Noordhuis
b21c8e0bfd installer: honor --without-npm, default install path
* honor the --without-waf and --without-npm configure switches

* a small logic bug made the installer script install to $PWD instead of
  /usr/local if --prefix= was not passed to configure
2012-08-04 02:18:18 +02:00
Bert Belder
5fdeebd94d net: make pause work with connecting sockets
This fixes the problem that calling pause() on a socket would not
actually prevent 'data' events from being emitted. It also replaces
the existing test by a more elaborate one.

Ref: #3118
2012-08-03 17:11:08 +02:00
isaacs
585388bbd8 blog: Fix date on 0.8.5 release 2012-08-02 15:00:57 -07:00
isaacs
575c12bba3 Blog post about 0.8.5 2012-08-02 14:59:47 -07:00
isaacs
02dae998c3 Now working on 0.8.6 2012-08-02 14:58:15 -07:00
isaacs
2bee3aeee9 Merge branch 'v0.8.5-release' into v0.8 2012-08-02 14:57:34 -07:00
isaacs
9b86a4453f 2012.08.02, Version 0.8.5 (Stable)
* node: tag Encode and friends NODE_EXTERN (Ben Noordhuis)

* fs: fix ReadStream / WriteStream missing callback (Gil Pedersen)

* fs: fix readFileSync("/proc/cpuinfo") regression (Ben Noordhuis)

* installer: don't assume bash is installed (Ben Noordhuis)

* Report errors properly from --eval and stdin (isaacs)

* assert: fix throws() throws an error without message property (koichik)

* cluster: fix libuv assert in net.listen() (Ben Noordhuis)

* build: always link sunos builds with libumem (Trent Mick)

* build: improve armv7 / hard-float detection (Adam Malcontenti-Wilson)

* https: Use host header as effective servername (isaacs)

* sunos: work around OS bug to prevent fs.watch() from spinning (Bryan Cantrill)

* linux: fix 'two watchers, one path' segfault (Ben Noordhuis)

* windows: fix memory leaks in many fs functions (Bert Belder)

* windows: don't allow directories to be opened for writing/appending (Bert Belder)

* windows: make fork() work even when not all stdio handles are valid (Bert Belder)

* windows: make unlink() not remove mount points, and improve performance (Bert Belder)

* build: Sign pkg installer for OS X (isaacs)
2012-08-02 13:56:50 -07:00
isaacs
2dd710e7ea build: Sign pkg installer for OS X
This makes the installer work on Mountain Lion.
2012-08-02 13:56:50 -07:00
Ben Noordhuis
9315377693 doc: improve cluster.workers documentation 2012-08-02 17:47:33 +02:00
isaacs
37537d5720 test: stdin error messages 2012-08-02 08:11:18 -07:00
isaacs
f5c07b65a0 npm: Upgrade to 1.1.46 2012-08-02 08:09:47 -07:00
Ben Noordhuis
50e00de92a installer: fix cross-compile installs
The old installer was a JS script, which didn't work if node had been
cross-compiled for another architecture. Replace it with a python script.

Fixes #3807.
2012-08-02 13:51:35 +02:00
Ben Noordhuis
34c750d7a9 net: fix .listen({fd:0}) 2012-08-02 13:37:02 +02:00
Ben Noordhuis
6db9e12de5 deps: remove openssl apps and tests
Shrinks the tarball by a few hundred kilobytes and fixes a broken symlinks
issue on Windows.

Fixes #3813.
2012-08-02 12:20:19 +02:00