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

fix wrong hash results on Windows with some CPUs that support Intel SHA Extension #12913

Closed
wants to merge 2 commits into from

Conversation

shigeki
Copy link
Contributor

@shigeki shigeki commented May 9, 2017

Checklist
  • [x ] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • [x ] commit message follows commit guidelines
Affected core subsystem(s)

openssl

This PR fixes wrong hash results on Windows with some CPUs that support Intel SHA Extension and resolves the issue of TLS connection errors.

The same issue was reported to the upstream in openssl/openssl#3241 and fixed in openssl/openssl#3385.

This PR has the cherry-pick of the fix and asm files are updated.

This fix has already confirmed by the issue reporter in #12691 (comment) because the issue can be reproduced on only limited CPU.

Fixes: #12691

CC: @nodejs/crypto

This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: nodejs#12691
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: nodejs#12691
@shigeki shigeki added the openssl Issues and PRs related to the OpenSSL dependency. label May 9, 2017
@nodejs-github-bot nodejs-github-bot added the openssl Issues and PRs related to the OpenSSL dependency. label May 9, 2017
@shigeki
Copy link
Contributor Author

shigeki commented May 9, 2017

@addaleax
Copy link
Member

Landed in 88d2e69...e896898

@addaleax addaleax closed this May 15, 2017
addaleax pushed a commit that referenced this pull request May 15, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax pushed a commit that referenced this pull request May 15, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: nodejs#12691
PR-URL: nodejs#12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: nodejs#12691
PR-URL: nodejs#12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@jasnell jasnell mentioned this pull request May 28, 2017
@MylesBorins
Copy link
Contributor

I've backported this to both v4 and v6

@tniessen had said

If we backport this to v4 and v6, we might want to add a prominent warning about this issue. As far as I know, the new releases will compute different checksums depending on the processor model, which can cause severe problems in a variety of applications

Do people have particular thoughts on this?

/cc @nodejs/ctc @nodejs/lts @nodejs/crypto @nodejs/security

MylesBorins pushed a commit that referenced this pull request Jun 22, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jun 22, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jun 22, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jun 22, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins mentioned this pull request Jul 18, 2017
MylesBorins added a commit that referenced this pull request Aug 1, 2017
This LTS release comes with 221 commits. This includes 80 which are
test related, 52 which are doc related, 32 which are build / tool
related and 10 commits which are updates to dependencies.

Notable Changes:

* configure:
  - add mips64el to valid_arch (Aditya Anand)
    - #13620
* crypto:
  - Updated root certificates based on [NSS 3.30] (Ben Noordhuis)
    - #13279
    - #12402
    - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30_release_notes
* deps:
  - upgrade OpenSSL to version 1.0.2.l (Shigeki Ohtsu)
    - #12913
* http:
  - parse errors are now reported when NODE_DEBUG=http (Sam Roberts)
    - #13206
  - Agent construction can now be envoked without `new` (cjihrig)
    - #12927
* zlib:
  - node will now throw an Error when zlib rejects the value of windowBits,
    instead of crashing (Alexey Orlenko)
    - #13098

PR-URL: #14356
MylesBorins added a commit that referenced this pull request Aug 1, 2017
This LTS release comes with 221 commits. This includes 80 which are
test related, 52 which are doc related, 32 which are build / tool
related and 10 commits which are updates to dependencies.

Notable Changes:

* configure:
  - add mips64el to valid_arch (Aditya Anand)
    - #13620
* crypto:
  - Updated root certificates based on [NSS 3.30] (Ben Noordhuis)
    - #13279
    - #12402
    - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.30_release_notes
* deps:
  - upgrade OpenSSL to version 1.0.2.l (Shigeki Ohtsu)
    - #12913
* http:
  - parse errors are now reported when NODE_DEBUG=http (Sam Roberts)
    - #13206
  - Agent construction can now be envoked without `new` (cjihrig)
    - #12927
* zlib:
  - node will now throw an Error when zlib rejects the value of windowBits,
    instead of crashing (Alexey Orlenko)
    - #13098

PR-URL: #14356
@MylesBorins MylesBorins mentioned this pull request Sep 20, 2017
MylesBorins pushed a commit that referenced this pull request Oct 25, 2017
This fixes wrong hash results on Windows with some CPUs that support
Intel SHA Extension and resolves the issue of TLS connection errors.

After upgrading forthcoming openssl-1.0.2l, this is no nolonger needed.

  Original commit message:

    perlasm/x86_64-xlate.pl: work around problem with hex constants in masm.

    Perl, multiple versions, for some reason occasionally takes issue with
    letter b[?] in ox([0-9a-f]+) regex. As result some constants, such as
    0xb1 came out wrong when generating code for MASM. Fixes GH#3241.

    Reviewed-by: Rich Salz <rsalz@openssl.org>
    (Merged from openssl/openssl#3385)

    (cherry picked from commit c47aea8af1e28e46e1ad5e2e7468b49fec3f4f29)

Refs: openssl/openssl#3241
Refs: openssl/openssl#3385
Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Oct 25, 2017
Regenerate asm files according to the fix of
openssl/crypto/perlasm/x86_64-xlate.pl.

Fixes: #12691
PR-URL: #12913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins mentioned this pull request Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openssl Issues and PRs related to the OpenSSL dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSL problem on Intel Celeron N3350
6 participants