GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: make server not use DHE in less than 1024bits for fix agaist Logjam Attack by shigeki · Pull Request #1739 · nodejs/node

Conversation

@shigeki

@shigeki shigeki commented May 20, 2015

Copy link
Copy Markdown
Contributor

DHE key lengths less than 1024bits is already weaken as pointed out in https://weakdh.org/ . 1024bits will not be safe in near future. We will extend this up to 2048bits somedays later.

What do about for clients? We can obtain DHE keylength via SSL_get_server_tmp_key() but I think we'd better to have an new options to limit the DHE key size with 1024bits default. Thoughts?

CI results are https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/697/. It looks fine except jenkins, child_process and sync-io-option error.

R= @bnoordhuis @indutny

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shigeki shigeki added the tls Issues and PRs related to the tls subsystem. label May 20, 2015
@brendanashworth

brendanashworth commented May 20, 2015

Copy link
Copy Markdown
Contributor

As this is a security patch (?), does this cheat the semver major cycle?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shigeki

shigeki commented May 20, 2015

Copy link
Copy Markdown
Contributor Author

Yes, this is a security patch but it is a similar kind of the fix for limiting cipher suites we did before. We did not change semver in changing the default cipher suite so I think this follows it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shigeki
shigeki force-pushed the fix_LogjamAttack branch from e9e7ccf to cdc7c17 Compare May 20, 2015 06:45
@shigeki

shigeki commented May 20, 2015

Copy link
Copy Markdown
Contributor Author

Update the doc description to recommend to use 2048bits or more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChALkeR

ChALkeR commented May 20, 2015

Copy link
Copy Markdown
Member

A quick question: when 1024 bits will be not safe, will you make a similar patch to make it throw an error then? Maybe it would be reasonable to print a warning to stderr in advance (maybe even now) for 1024 bits so less people will get surprised when that will be turned into an error?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnoordhuis
bnoordhuis reviewed May 20, 2015
View reviewed changes
Comment thread doc/api/tls.markdown Outdated

@bnoordhuis bnoordhuis May 20, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • s/1024bits/1024 bits/, ditto for 2048bits.
  • I would s/recommended/strongly recommended/ and maybe add a warning that someday we're going to enforce it.
  • s/enough strong security/stronger security/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Shigeki Ohtsu
tls: make server not use DHE in less than 1024bits
81c4808
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.
@shigeki
shigeki force-pushed the fix_LogjamAttack branch from cdc7c17 to 81c4808 Compare May 20, 2015 11:49
@shigeki

shigeki commented May 20, 2015

Copy link
Copy Markdown
Contributor Author

@ChALkeR Printing WARNING is a good idea to me. Updated it in this PR.

@bnoordhuis Updated according your comments. My editor was wired when I wrote assert.throws. I also found a bug of my tests that the 512 bits test does not invoke the next test. PTAL.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bnoordhuis
bnoordhuis reviewed May 20, 2015
View reviewed changes
Comment thread src/node_crypto.cc

@bnoordhuis bnoordhuis May 20, 2015

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: make keylen const.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bnoordhuis

bnoordhuis commented May 20, 2015

Copy link
Copy Markdown
Member

LGTM

A suggestion for a follow-up PR: print the warning from JS land with console.trace() to make it easy to figure out where the call comes from.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented May 20, 2015

Copy link
Copy Markdown
Member

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

shigeki pushed a commit that referenced this pull request May 20, 2015
Shigeki Ohtsu
tls: make server not use DHE in less than 1024bits
9b35be5
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: #1739
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@shigeki

shigeki commented May 20, 2015

Copy link
Copy Markdown
Contributor Author

@bnoordhuis @indutny Thanks for reviewing. Landed in 9b35be5 with Ben's suggestion to add const for kenlen. For console.trace, I will work it with a client fix later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shigeki shigeki closed this May 20, 2015
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 21, 2015
Shigeki Ohtsu @Fishrock123
tls: make server not use DHE in less than 1024bits
f8e5eaa
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: nodejs#1739
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@rvagg rvagg mentioned this pull request May 23, 2015
Release proposal v2.1.0 #1777
Closed
rvagg added a commit to rvagg/io.js that referenced this pull request May 23, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
dad6dfe
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss) nodejs#1779.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit to rvagg/io.js that referenced this pull request May 23, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
7c92f3a
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit to rvagg/io.js that referenced this pull request May 23, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
c71bad6
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
@yosuke-furukawa yosuke-furukawa mentioned this pull request May 23, 2015
Evangelism: Weekly Update for May 22nd nodejs/evangelism#73
Closed
rvagg added a commit to rvagg/io.js that referenced this pull request May 24, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
eac634a
PR-URL: nodejs#1532

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) nodejs#1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) nodejs#1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) nodejs#1699 nodejs#1768 nodejs#1779.
* npm: Upgraded to v2.10.1, release notes can be found in
  https://github.com/npm/npm/releases/tag/v2.10.1 and
  https://github.com/npm/npm/releases/tag/v2.10.0.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) nodejs#1749.
rvagg added a commit that referenced this pull request May 24, 2015
@rvagg
2015-05-24 io.js v2.1.0 Release
4d8f4d5
PR-URL: #1777

Notable Changes:

* crypto: Diffie-Hellman key exchange (DHE) parameters ('dhparams') must now be
  1024 bits or longer or an error will be thrown. A warning will also be printed
  to the console if you supply less than 2048 bits. See https://weakdh.org/ for
  further context on this security concern. (Shigeki Ohtsu) #1739.
* node: A new --trace-sync-io command line flag will print a warning and a stack
  trace whenever a synchronous API is used. This can be used to track down
  synchronous calls that may be slowing down an application.
  (Trevor Norris) #1707.
* node: To allow for chaining of methods, the setTimeout(), setKeepAlive(),
  setNoDelay(), ref() and unref() methods used in 'net', 'dgram', 'http',
  'https' and 'tls' now return the current instance instead of undefined
  (Roman Reiss & Evan Lucas) #1699 #1768 #1779.
* npm: Upgraded to v2.10.1, release notes can be found in
  https://github.com/npm/npm/releases/tag/v2.10.1 and
  https://github.com/npm/npm/releases/tag/v2.10.0.
* util: A significant speed-up (in the order of 35%) for the common-case of a
  single string argument to util.format(), used by console.log()
  (Сковорода Никита Андреевич) #1749.
@yosuke-furukawa yosuke-furukawa mentioned this pull request May 25, 2015
Create weekly-update.2015-05-22.md nodejs/evangelism#83
Merged
shigeki pushed a commit to shigeki/node that referenced this pull request May 30, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
dd8a2a2
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in nodejs#1739.
shigeki pushed a commit to shigeki/node that referenced this pull request Jun 1, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
b993f36
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in nodejs#1739.
shigeki pushed a commit to shigeki/node that referenced this pull request Jun 1, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
9a5d761
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in nodejs#1739.
shigeki pushed a commit to shigeki/node that referenced this pull request Jun 1, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
1a999d7
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in nodejs#1739.
andrewdeandrade pushed a commit to andrewdeandrade/node that referenced this pull request Jun 3, 2015
Shigeki Ohtsu @andrewdeandrade
tls: make server not use DHE in less than 1024bits
5e8380e
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: nodejs/node#1739
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
@mhdawson mhdawson mentioned this pull request Jun 11, 2015
Update openssl to 1.0.1o nodejs/node-v0.x-archive#25509
Closed
@shigeki shigeki mentioned this pull request Jun 12, 2015
Upgrade to openssl-1.0.2b #1950
Closed
shigeki pushed a commit to shigeki/node that referenced this pull request Jun 12, 2015
Shigeki Ohtsu
tls: make server not use DHE in less than 1024bits
c65484a
DHE key lengths less than 1024bits is already weaken as pointed out in
https://weakdh.org/ . 1024bits will not be safe in near future. We
will extend this up to 2048bits somedays later.

PR-URL: nodejs#1739
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
This was referenced Jun 23, 2015
Limit use of small DH keys in Node nodejs/node-v0.x-archive#25562
Closed
Fix for the issue 25366. nodejs/node-v0.x-archive#25564
Closed
shigeki pushed a commit to shigeki/node that referenced this pull request Aug 27, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
b867a31
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in nodejs#1739.
shigeki pushed a commit that referenced this pull request Oct 16, 2015
Shigeki Ohtsu
tls: output warning of setDHParam to console.trace
0140e1b
To make it easy to figure out where the warning comes from.
Also fix style and variable name that was made in #1739.

PR-URL: #1831
Reviewed-By: indutny - Fedor Indutny <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
@Shay12tg Shay12tg mentioned this pull request Oct 15, 2026
node:tls: createSecureContext accepts DH parameters smaller than 1024 bits oven-sh/bun#45352
Open
@robobun robobun mentioned this pull request Oct 17, 2026
node:tls: reject a dhparam smaller than 1024 bits oven-sh/bun#45637
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

tls Issues and PRs related to the tls subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@shigeki @brendanashworth @ChALkeR @bnoordhuis @indutny
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.