* [ruby-core:61690] [ruby-trunk - Bug #9677] [Open] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
@ 2014-03-26 5:54 ` davidegrayson
2014-05-03 10:05 ` [ruby-core:62320] [ruby-trunk - Bug #9677] " s
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: davidegrayson @ 2014-03-26 5:54 UTC (permalink / raw
To: ruby-core
Issue #9677 has been reported by David Grayson.
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677
* Author: David Grayson
* Status: Open
* Priority: Normal
* Assignee: Martin Bosslet
* Category: ext/openssl
* Target version:
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:62320] [ruby-trunk - Bug #9677] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
2014-03-26 5:54 ` [ruby-core:61690] [ruby-trunk - Bug #9677] [Open] OpenSSL::PKey::EC#to_text causes a segmentation fault davidegrayson
@ 2014-05-03 10:05 ` s
2014-05-03 10:07 ` [ruby-core:62321] " s
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: s @ 2014-05-03 10:05 UTC (permalink / raw
To: ruby-core
Issue #9677 has been updated by Sam Kottler.
Thanks for the report! I'm looking into this now.
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677#change-46477
* Author: David Grayson
* Status: Open
* Priority: Normal
* Assignee: Martin Bosslet
* Category: ext/openssl
* Target version:
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:62321] [ruby-trunk - Bug #9677] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
2014-03-26 5:54 ` [ruby-core:61690] [ruby-trunk - Bug #9677] [Open] OpenSSL::PKey::EC#to_text causes a segmentation fault davidegrayson
2014-05-03 10:05 ` [ruby-core:62320] [ruby-trunk - Bug #9677] " s
@ 2014-05-03 10:07 ` s
2014-05-07 7:03 ` [ruby-core:62443] " phasis
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: s @ 2014-05-03 10:07 UTC (permalink / raw
To: ruby-core
Issue #9677 has been updated by Sam Kottler.
It's worth noting that this segfault happens on not only arch, but also OSX, debian, and fedora. That makes it seem like a generic issue which is not isolated to arch.
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677#change-46478
* Author: David Grayson
* Status: Open
* Priority: Normal
* Assignee: Martin Bosslet
* Category: ext/openssl
* Target version:
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:62443] [ruby-trunk - Bug #9677] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
` (2 preceding siblings ...)
2014-05-03 10:07 ` [ruby-core:62321] " s
@ 2014-05-07 7:03 ` phasis
2015-09-13 3:08 ` [ruby-core:70738] [Ruby trunk " zzak
2016-06-15 14:04 ` [ruby-core:76036] [Ruby trunk Bug#9677][Third Party's Issue] " k
5 siblings, 0 replies; 6+ messages in thread
From: phasis @ 2014-05-07 7:03 UTC (permalink / raw
To: ruby-core
Issue #9677 has been updated by Heesob Park.
I found that the segmentation fault occurs when a public_key is not set.
Here is a patch.
~~~
diff --git a/ossl_pkey_ec.c b/ossl_pkey_ec.c
index 5e419bd..070bfc4 100644
--- a/ossl_pkey_ec.c
+++ b/ossl_pkey_ec.c
@@ -574,6 +574,13 @@ static VALUE ossl_ec_key_to_text(VALUE self)
VALUE str;
Require_EC_KEY(self, ec);
+
+ if (EC_KEY_get0_public_key(ec) == NULL)
+ ossl_raise(eECError, "can't export - no public key set");
+
+ if (EC_KEY_check_key(ec) != 1)
+ ossl_raise(eECError, "can't export - EC_KEY_check_key failed");
+
if (!(out = BIO_new(BIO_s_mem()))) {
ossl_raise(eECError, "BIO_new(BIO_s_mem())");
}
~~~
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677#change-46590
* Author: David Grayson
* Status: Open
* Priority: Normal
* Assignee: Martin Bosslet
* Category: ext/openssl
* Target version:
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [ruby-core:70738] [Ruby trunk - Bug #9677] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
` (3 preceding siblings ...)
2014-05-07 7:03 ` [ruby-core:62443] " phasis
@ 2015-09-13 3:08 ` zzak
2016-06-15 14:04 ` [ruby-core:76036] [Ruby trunk Bug#9677][Third Party's Issue] " k
5 siblings, 0 replies; 6+ messages in thread
From: zzak @ 2015-09-13 3:08 UTC (permalink / raw
To: ruby-core
Issue #9677 has been updated by Zachary Scott.
Assignee changed from Martin Bosslet to openssl
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677#change-54117
* Author: David Grayson
* Status: Open
* Priority: Normal
* Assignee: openssl
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [ruby-core:76036] [Ruby trunk Bug#9677][Third Party's Issue] OpenSSL::PKey::EC#to_text causes a segmentation fault
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
` (4 preceding siblings ...)
2015-09-13 3:08 ` [ruby-core:70738] [Ruby trunk " zzak
@ 2016-06-15 14:04 ` k
5 siblings, 0 replies; 6+ messages in thread
From: k @ 2016-06-15 14:04 UTC (permalink / raw
To: ruby-core
Issue #9677 has been updated by Kazuki Yamaguchi.
Status changed from Open to Third Party's Issue
This is OpenSSL RT3065, and fixed in OpenSSL 1.0.0o, 1.0.1j and 1.0.2.
https://rt.openssl.org/Ticket/Display.html?id=3065
I think this is no longer an issue so I'm closing this, but let me know if this still occurs.
----------------------------------------
Bug #9677: OpenSSL::PKey::EC#to_text causes a segmentation fault
https://bugs.ruby-lang.org/issues/9677#change-59237
* Author: David Grayson
* Status: Third Party's Issue
* Priority: Normal
* Assignee: openssl
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I have Ruby 2.1.1p76 and when I try to run a particular snippet of code using the OpenSSL extension, I get a segmentation fault. I am running Arch Linux and I have openssl 1.0.1.f-1. I built Ruby from source. This bug also affects Ruby 2.1.0.
Here is a snippet of shell output showing the Ruby command that causes the problem:
~~~
$ ruby -v -ropenssl -e "OpenSSL::PKey::EC.new('secp256k1').to_text"
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-e:1: [BUG] Segmentation fault at 0x00000000000000
...
~~~
I attached a text file with the full output from Ruby to this bug report.
This other OpenSSL segmentation fault issue might be related:
https://bugs.ruby-lang.org/issues/9592
---Files--------------------------------
openssl_to_text_segfault.txt (15.7 KB)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-06-15 13:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-9677.20140326055422@ruby-lang.org>
2014-03-26 5:54 ` [ruby-core:61690] [ruby-trunk - Bug #9677] [Open] OpenSSL::PKey::EC#to_text causes a segmentation fault davidegrayson
2014-05-03 10:05 ` [ruby-core:62320] [ruby-trunk - Bug #9677] " s
2014-05-03 10:07 ` [ruby-core:62321] " s
2014-05-07 7:03 ` [ruby-core:62443] " phasis
2015-09-13 3:08 ` [ruby-core:70738] [Ruby trunk " zzak
2016-06-15 14:04 ` [ruby-core:76036] [Ruby trunk Bug#9677][Third Party's Issue] " k
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).