-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
SSL core dump in v6.9.1 #9551
Comments
/cc @indutny |
@rdkgit can you provide a standalone example? |
@rdkgit could you please provide a certificate chain that you used? |
Here is an example I just now tested and it core dumps node when I connect to it using openssl s_client. // test.js
// test to see if node core dumps
var fs = require('fs');
var constants = require('constants');
var http = require('http');
var https = require('https');
var httpPort = 8080;
var httpsPort = 8443;
var sslOptions = {
key: fs.readFileSync('/tmp/exterus-key.pem'),
cert: fs.readFileSync('/tmp/exterus-cert.pem'),
// startssl sub.class1.server.ca.pem append >> cert pem
secureProtocol: 'SSLv23_method',
secureOptions: constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_SSLv2,
};
// set up proxy server and start listening!!
http.createServer().listen(httpPort);
console.log("Test listening on "+httpPort);
https.createServer(sslOptions).listen(httpsPort);
console.log("Test listening on "+httpsPort); |
The cert I'm using is from startssl. Do you want me to send you the cert itself? Or, what kind of output would you like? Thanks, Bobby |
@rdkgit may I ask you to put the |
OK, uploaded. Are you able to reference it? Sorry if thats a dumb question. Havent used this feature of github before. |
Thanks! Here is the link: https://gist.github.com/rdkgit/130b3476d82a61fab9a2ed164ac102ee |
@rdkgit have you built node.js from source? Or have you downloaded the binary? |
I'm using the pre-built platform packages for both Fedora, RHEL, and Centos. It core dumps on my ec2 instance but not my Fedora desktop running older version of node. |
Oh wait! I just realized that you are using shared openssl library: |
OpenSSL 1.0.1e-fips 11 Feb 2013 On my Fedora system where no core dumps (but older nodejs version), I have 1.0.2h though. |
@rdkgit what does |
/bin/node -pe process.versions.openssl |
ldd /bin/node |
ok, at least it matches... |
Is it the same on your desktop Fedora? |
No, my desktop is running. No core dump on desktop config. /bin/node --version /bin/openssl version On my own webserver, it also runs fine, no core dump. /bin/node --version |
I think you should report this to RedHat unless you also get crashes with the official v6.9.1 binaries from https://nodejs.org/. Please post a backtrace if that is the case. |
Back from a weekend of backpacking. I will download/install the official nodejs binaries and see if that fixes it. Thanks, Bobby |
Hi! I completed uninstalled nodejs rpm and npm rpm from the RHEL system. I downloaded and installed nodejs tar file from website. Node now works with my test script and with my original script both with http and https. Whats the best way to report this to RedHat? I'm using RHEL with an EC2 instance and don't have a direct relationship with RedHat. Will they accept a bug request from a non-paying user? Thanks, Bobby |
cc @sgallagher - maybe you can answer @rdkgit's question? I'll close out the bug report since it's a downstream issue. |
Thanks! Happy to provide any/all info to RH so we can fix this in the RHEL package. Bobby |
@rdkgit Where did you get the package for RHEL? Was it one provided by Red Hat Software Collections or was it something you got from Fedora EPEL (Extra Packages for Enterprise Linux)? The former are supported by Red Hat, the latter are community-supported. If you got it from EPEL, then you should file a bug at https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora%20EPEL in the Please also include the full output of |
Hey. I believe it was from RHEL EPEL repo as I did not find it in the regular/default REPOs that were set up with my ec2 instance. yum list nodejs I will file a bug via bugzilla. Thanks, Bobby |
For what it's worth, I just tested this with:
I was unable to reproduce the issue in either FIPS or non-FIPS mode with that version of OpenSSL (the latest available on RHEL 7.2). Can you confirm that you're using the most recent version? Please provide the output of |
Hi! The ec2 instance I'm running has RHEL 7.3 and the following: openssl-libs-1.0.1e-60.el7.x86_64 When I use this config, it core dumps reliably with my test program. I will create a bugzilla entry. Thanks, Bobby |
@rdkgit Please include detailed information about how you generated the certificate in question (as in, exact steps). My guess is that there's something atypical about the certificate or its CA chain that's triggering a behavior I can't reproduce with a certificate generated the way I normally do. |
Hi! Here is the command I ran to generate the CSR. I then uploaded to startssl and got the cert. /bin/openssl req -out exterus.csr -new -newkey rsa:2048 -nodes -keyout exterus.key I generated the csr on my desktop fedora system using my local copy of openssl. %/bin/openssl version Bobby |
Update from bugzilla investigation. https://bugzilla.redhat.com/show_bug.cgi?id=1394948 My startssl cert .pem file also had the intermediate startssl cert appended to the end of it. Apparently, this is known to crash some revs of nodejs due to either openssl bug or bug in node code. Not sure. Either way, when I remove the intermediate cert (its not needed anyway), the problem goes away. Thanks to all for the help resolving this. Bobby |
@rdkgit I can't comment on the bugzilla, but if they have questions about node, they should ask them here, I'm familiar with the referenced code. Btw, I'm surprised you don't need the intermediate cert... how does the peer know your intermediate if you don't send it? |
Hi! I'm using the startcom class-1 server ca cert and that seems to make everyone happy. The convention that I understood is that one could append that the CA server cert to one's server cert. That works in other versions of node but this particular version of node core dumps. When I moved the start intermediate cert into the CA SSL option, everything worked. Thanks, Bobby |
I can confirm this same issue. Have a very similar setup to the original one described and removing the second certificate in the chain did solve the issue. Seems to be a low level C library bug as reported on the redhat website. |
Just for documentation sake, I had this issue with an EC2 instance, openssl and Let's Encrypt aswell:
npm-3.10.10-1.6.9.4.2.el7.x86_64
nodejs-6.9.4-2.el7.x86_64
openssl-1.0.1e-60.el7_3.1.x86_64 Replaced |
@yuriploc thanks for the suggestion, I replaced my |
Created simple https server and try to connect to it with various clients. node core dumps w/o any stack trace. GDB output below. Sorry if this is duplicate. I was not find anything related via searching. Code works fine on Fedora system running 4.6.1. Also, system it is core-dumping on is an EC2 instance thus virtual.
The text was updated successfully, but these errors were encountered: