Project

General

Profile

Actions

Bug #12428

closed

OpenSSL::PKey::RSA.public_encrypt crashes ruby when initiated without key size.

Added by cjeon (CHEOLHO JEON) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
[ruby-core:75720]

Description

Hi, I think I found a bug. OpenSSL::PKey::RSA initiated without keysize crashes when public_encrypt is called.
Below script will crash ruby (it is attached as opensslcrash.rb)

require('openssl')
p = OpenSSL::PKey::RSA.new
p.public_encrypt('hi')

I'm attaching error message(ruby opensslcrash.rb &> error_message.txt) and crash reports under /Users/CJeon/Library/Logs/DiagnosticReports.

Let me know if you guys need further information. Thanks!


Files

error_message.txt (7.03 KB) error_message.txt error message cjeon (CHEOLHO JEON), 05/25/2016 11:28 AM
crash.tar (149 KB) crash.tar crash reports cjeon (CHEOLHO JEON), 05/25/2016 11:28 AM
opensslcrash.rb (276 Bytes) opensslcrash.rb cjeon (CHEOLHO JEON), 05/25/2016 11:34 AM

Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #12865: openssl: segmentation fault when nil is passed as keyClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0