Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1934642

Summary: ECDHE ciphers missing in rh-nodejs14
Product: Red Hat Software Collections Reporter: Jan Staněk <jstanek>
Component: nodejsAssignee: Jan Staněk <jstanek>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Houska <jhouska>
Severity: high Docs Contact:
Priority: unspecified    
Version: rh-nodejs14CC: hhorak, jeffrey.dillahay, jhouska, jstanek, msuchy, yuri
Target Milestone: alphaKeywords: Triaged, ZStream
Target Release: 3.7Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: During refactoring, a part of a patch was missed which was necessary to properly setup ECDHE negotiation with OpenSSL 1.0.*. Consequence: No ECDHE ciphers (i.e. ECDHE-RSA-AES128-GCM-SHA256) could be negotiated with the server. Fix: Missing parts of ECDHE setup were reinstated. Result: ECDHE ciphers can be negotiated.
Story Points: ---
Clone Of: 1910749
: 1942591 (view as bug list) Environment:
Last Closed: 2022-10-06 15:46:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1910749, 1942591    

Description Jan Staněk 2021-03-03 15:40:28 UTC
+++ This bug was initially created as a clone of Bug #1910749 +++

Hi.

Someone broke ECDHE cipherset in rh-nodejs12-nodejs-12.19.1-2.el7.x86_64.rpm 
It works just fine with previous version rh-nodejs12-nodejs-12.18.2-1.el7.x86_64 .

The error that occurs when trying to negotiate any ECDHE cipher (e.g., ECDHE-RSA-AES128-GCM-SHA256) on the sever side is:  
Error: 140121568671872:error:1408A0C1:SSL routines:ssl3_get_client_hello:no shared cipher:s3_srvr.c:1435:


The application is https://github.com/haraka/Haraka and I don't have an easily reproducible case here as that would require installing and configuring whole app and I don't know the details on how the server/SSL creation is done.

Maybe there's something that you've touched recently that might've been related to ECDH?

Thanks.

--- Additional comment from Yuri Arabadji on 2020-12-24 14:06:57 UTC ---

Problem doesn't manifest itself if using stock node from https://nodejs.org/dist/v12.19.1/node-v12.19.1-linux-x64.tar.xz

--- Additional comment from RHEL Program Management on 2021-01-08 15:47:31 UTC ---

This bug was reopened or transitioned from a non-RHEL to RHEL product.  The stale date has been reset to +6 months.

--- Additional comment from RHEL Program Management on 2021-01-08 15:47:31 UTC ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from jeff dillahay on 2021-01-27 15:49:20 UTC ---

The below code works on 12.18.2 but not 12.19.1

#!/usr/bin/node 

const fs = require('fs')

require('tls')
.createServer(
        // options
        {

                key: fs.readFileSync('test.key'),
                cert: fs.readFileSync('test.cer'),
                ca: [ fs.readFileSync('root.cer') ],
//                ciphers: 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256',
        }, 
        // handler
        (socket) => socket.write('HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 2\r\nConnection: close\r\n\r\nOK\r\n')
)
.listen(8433, () => { console.log(`listening on ${8433}`) })

--- Additional comment from jeff dillahay on 2021-01-27 15:55:03 UTC ---

The above code has the "cipher" line commented out, but if you uncomment that and run on 12.19.1, this will replicate the problem.

--- Additional comment from Jan Staněk on 2021-03-03 13:26:05 UTC ---

After investigation, this issue first manifested in v12.18.4, which conincides with a OpenSSL patch refactoring effort. During the refactor, a part of the patch was missed which was necessary to properly setup ECDHE negotiation with OpenSSL 1.0.* – see the patch for the missing part.

The fix was tested with the provided reproducer – thanks a lot for it!

Since the same refactored patches are used in rh-nodejs14, it stands to reason it is broken there as well. I will investigate further and clone this appropriately.

Comment 7 Jan Staněk 2021-08-09 09:29:23 UTC
The z-stream errata should now be shipped. Switching this y-stream tracker ON_QA for verification.