Skip to content
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

domains: fix handling of uncaught exceptions #3885

Conversation

misterdjules
Copy link

Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:

  1. no error handler is set on the domain within which an error is thrown
  2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes #3607 and #3653.

@misterdjules misterdjules added domain Issues and PRs related to the domain subsystem. lts-watch-v0.12 labels Nov 17, 2015
@misterdjules
Copy link
Author

This is the continuation of #3638, retargeted to the v0.12-staging branch.

@misterdjules
Copy link
Author

/cc @nodejs/lts @nodejs/collaborators @nodejs/ctc

@jasnell
Copy link
Member

jasnell commented Nov 18, 2015

LGTM. Would appreciate a few more eyes on it tho @nodejs/lts

@misterdjules misterdjules force-pushed the fix-uncaught-exceptions-domains-v0.12 branch from 3e5620d to 674ac29 Compare November 23, 2015 23:19
@misterdjules
Copy link
Author

Updated this PR according to the code review comments in #3654 that apply to the v0.12 branch.

Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes nodejs#3607 and nodejs#3653.
@misterdjules misterdjules force-pushed the fix-uncaught-exceptions-domains-v0.12 branch from 674ac29 to 007a7c2 Compare November 24, 2015 19:03
@misterdjules
Copy link
Author

Updated again from code review comments in #3654 that apply to the v0.12 branch.

@misterdjules
Copy link
Author

CI tests running.

@misterdjules
Copy link
Author

Back ported changes according to latest code review in #3654 and started CI tests again.

@jasnell
Copy link
Member

jasnell commented Dec 12, 2015

LGTM if CI is green

misterdjules pushed a commit that referenced this pull request Dec 16, 2015
Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes #3607 and #3653.

PR: #3885
PR-URL: #3885
Reviewed-By: James M Snell <jasnell@gmail.com>
@misterdjules
Copy link
Author

Landed in 16417cc.

@nodejs/lts Should I remove the lts-watch-v0.12 label now that it landed, and should we create a lts-landed-on-v0.12.x label?

@jasnell
Copy link
Member

jasnell commented Dec 16, 2015

I attached the land-on-v0.12 label.

MylesBorins pushed a commit that referenced this pull request Feb 11, 2016
Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes #3607 and #3653.

PR: #3885
PR-URL: #3885
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg added a commit that referenced this pull request Feb 24, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an `'uncaughtException'` event on the `process` object
    when no error handler is set on the domain within which an error
    is thrown and an `'uncaughtException'` event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
rvagg added a commit that referenced this pull request Feb 26, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an `'uncaughtException'` event on the `process` object
    when no error handler is set on the domain within which an error
    is thrown and an `'uncaughtException'` event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
rvagg added a commit that referenced this pull request Mar 3, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an 'uncaughtException' event on the `process` object when
    no error handler is set on the domain within which an error is
    thrown and an 'uncaughtException' event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
* openssl: Upgrade from 1.0.2f to 1.0.2g
  (Ben Noordhuis) #5509
  - Fix a double-free defect in parsing malformed DSA keys that may
    potentially be used for DoS or memory corruption attacks. It is
    likely to be very difficult to use this defect for a practical
    attack and is therefore considered low severity for Node.js users.
    More info is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0705
  - Fix a defect that can cause memory corruption in certain very rare
    cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()`
    functions. It is believed that Node.js is not invoking the code
    paths that use these functions so practical attacks via Node.js
    using this defect are _unlikely_ to be possible. More info is
    available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0797
  - Fix a defect that makes the CacheBleed Attack
    (https://ssrg.nicta.com.au/projects/TS/cachebleed/) possible. This
    defect enables attackers to execute side-channel attacks leading
    to the potential recovery of entire RSA private keys. It only
    affects the Intel Sandy Bridge (and possibly older)
    microarchitecture when using hyper-threading. Newer
    microarchitectures, including Haswell, are unaffected. More info
    is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0702
rvagg added a commit that referenced this pull request Mar 3, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an 'uncaughtException' event on the `process` object when
    no error handler is set on the domain within which an error is
    thrown and an 'uncaughtException' event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
* openssl: Upgrade from 1.0.2f to 1.0.2g
  (Ben Noordhuis) #5509
  - Fix a double-free defect in parsing malformed DSA keys that may
    potentially be used for DoS or memory corruption attacks. It is
    likely to be very difficult to use this defect for a practical
    attack and is therefore considered low severity for Node.js users.
    More info is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0705
  - Fix a defect that can cause memory corruption in certain very rare
    cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()`
    functions. It is believed that Node.js is not invoking the code
    paths that use these functions so practical attacks via Node.js
    using this defect are _unlikely_ to be possible. More info is
    available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0797
  - Fix a defect that makes the CacheBleed Attack
    (https://ssrg.nicta.com.au/projects/TS/cachebleed/) possible. This
    defect enables attackers to execute side-channel attacks leading
    to the potential recovery of entire RSA private keys. It only
    affects the Intel Sandy Bridge (and possibly older)
    microarchitecture when using hyper-threading. Newer
    microarchitectures, including Haswell, are unaffected. More info
    is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0702
rvagg added a commit that referenced this pull request Mar 3, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an 'uncaughtException' event on the `process` object when
    no error handler is set on the domain within which an error is
    thrown and an 'uncaughtException' event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
* openssl: Upgrade from 1.0.2f to 1.0.2g
  (Ben Noordhuis) #5509
  - Fix a double-free defect in parsing malformed DSA keys that may
    potentially be used for DoS or memory corruption attacks. It is
    likely to be very difficult to use this defect for a practical
    attack and is therefore considered low severity for Node.js users.
    More info is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0705
  - Fix a defect that can cause memory corruption in certain very rare
    cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()`
    functions. It is believed that Node.js is not invoking the code
    paths that use these functions so practical attacks via Node.js
    using this defect are _unlikely_ to be possible. More info is
    available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0797
  - Fix a defect that makes the CacheBleed Attack
    (https://ssrg.nicta.com.au/projects/TS/cachebleed/) possible. This
    defect enables attackers to execute side-channel attacks leading
    to the potential recovery of entire RSA private keys. It only
    affects the Intel Sandy Bridge (and possibly older)
    microarchitecture when using hyper-threading. Newer
    microarchitectures, including Haswell, are unaffected. More info
    is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0702
rvagg added a commit that referenced this pull request Mar 4, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) #5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an 'uncaughtException' event on the `process` object when
    no error handler is set on the domain within which an error is
    thrown and an 'uncaughtException' event listener is set on
    `process`. (Julien Gilli) #3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) #3885
* openssl: Upgrade from 1.0.2f to 1.0.2g
  (Ben Noordhuis) #5509
  - Fix a double-free defect in parsing malformed DSA keys that may
    potentially be used for DoS or memory corruption attacks. It is
    likely to be very difficult to use this defect for a practical
    attack and is therefore considered low severity for Node.js users.
    More info is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0705
  - Fix a defect that can cause memory corruption in certain very rare
    cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()`
    functions. It is believed that Node.js is not invoking the code
    paths that use these functions so practical attacks via Node.js
    using this defect are _unlikely_ to be possible. More info is
    available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0797
  - Fix a defect that makes the CacheBleed Attack
    (https://ssrg.nicta.com.au/projects/TS/cachebleed/) possible. This
    defect enables attackers to execute side-channel attacks leading
    to the potential recovery of entire RSA private keys. It only
    affects the Intel Sandy Bridge (and possibly older)
    microarchitecture when using hyper-threading. Newer
    microarchitectures, including Haswell, are unaffected. More info
    is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0702

PR-URL: #5403
jBarz pushed a commit to ibmruntimes/node that referenced this pull request Nov 4, 2016
Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes nodejs#3607 and nodejs#3653.

PR: nodejs#3885
PR-URL: nodejs/node#3885
Reviewed-By: James M Snell <jasnell@gmail.com>
jBarz pushed a commit to ibmruntimes/node that referenced this pull request Nov 4, 2016
Notable changes:

* http_parser: Update to http-parser 2.3.2 to fix an unintentionally
  strict limitation of allowable header characters.
  (James M Snell) nodejs/node#5241
* domains:
  - Prevent an exit due to an exception being thrown rather than
    emitting an 'uncaughtException' event on the `process` object when
    no error handler is set on the domain within which an error is
    thrown and an 'uncaughtException' event listener is set on
    `process`. (Julien Gilli) nodejs/node#3885
  - Fix an issue where the process would not abort in the proper
    function call if an error is thrown within a domain with no error
    handler and `--abort-on-uncaught-exception` is used.
    (Julien Gilli) nodejs/node#3885
* openssl: Upgrade from 1.0.2f to 1.0.2g
  (Ben Noordhuis) nodejs/node#5509
  - Fix a double-free defect in parsing malformed DSA keys that may
    potentially be used for DoS or memory corruption attacks. It is
    likely to be very difficult to use this defect for a practical
    attack and is therefore considered low severity for Node.js users.
    More info is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0705
  - Fix a defect that can cause memory corruption in certain very rare
    cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()`
    functions. It is believed that Node.js is not invoking the code
    paths that use these functions so practical attacks via Node.js
    using this defect are _unlikely_ to be possible. More info is
    available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0797
  - Fix a defect that makes the CacheBleed Attack
    (https://ssrg.nicta.com.au/projects/TS/cachebleed/) possible. This
    defect enables attackers to execute side-channel attacks leading
    to the potential recovery of entire RSA private keys. It only
    affects the Intel Sandy Bridge (and possibly older)
    microarchitecture when using hyper-threading. Newer
    microarchitectures, including Haswell, are unaffected. More info
    is available at
    https://www.openssl.org/news/vulnerabilities.html#2016-0702
jBarz pushed a commit to ibmruntimes/node that referenced this pull request Feb 16, 2017
Fix node exiting due to an exception being thrown rather than emitting
an 'uncaughtException' event on the process object when:
1. no error handler is set on the domain within which an error is thrown
2. an 'uncaughtException' event listener is set on the process

Also fix an issue where the process would not abort in the proper
function call if an error is thrown within a domain with no error
handler and --abort-on-uncaught-exception is used.

Fixes nodejs#3607 and nodejs#3653.

PR: nodejs#3885
PR-URL: nodejs/node#3885
Reviewed-By: James M Snell <jasnell@gmail.com>
@misterdjules misterdjules deleted the fix-uncaught-exceptions-domains-v0.12 branch July 24, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain Issues and PRs related to the domain subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants