Project

General

Profile

Actions

Bug #12993

closed

SEGV in OpenSSL::TestSSL#test_close_after_socket_close

Added by vo.x (Vit Ondruch) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-11-30 trunk 56941) [x86_64-linux]
[ruby-core:78437]

Description

Testing the latest version of Ruby from trunk on Fedora Rawhide, the OpenSSL::TestSSL#test_close_after_socket_close segfaults (see the attached log). Not sure what might be possible the reason, if it is some change in Fedora in Ruby.

$ rpm -q glibc
glibc-2.24.90-19.fc26.x86_64

$ rpm -q openssl-libs
openssl-libs-1.1.0c-2.fc26.x86_64


Files

r56941-segv.log (193 KB) r56941-segv.log vo.x (Vit Ondruch), 11/30/2016 10:55 AM

Updated by vo.x (Vit Ondruch) over 7 years ago

r56693 used to build for me and now it fails, so this is apparently some change in Fedora Rawhide.

Updated by rhenium (Kazuki Yamaguchi) over 7 years ago

Not really a segfault but rb_sys_fail() is calling rb_bug() because errno is 0. OpenSSL 1.1.0c introduced a breaking change in SSL_read()1, and it is already reverted in the OpenSSL-1_1_0-stable branch.

I have patched ruby/openssl2 so that it never calls rb_sys_fail() with errno==0, like syswrite already does, but I haven't imported to trunk.

Updated by rhenium (Kazuki Yamaguchi) over 7 years ago

  • Status changed from Open to Closed
  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED

Imported at r56946.

Updated by vo.x (Vit Ondruch) over 7 years ago

Actually, I thought the fix was applied in the package according to the OpenSSL changelog:

* Tue Nov 22 2016 Tomáš Mráz <tmraz@redhat.com> 1.1.0c-2
- revert SSL_read() behavior change
- patch from upstream (#1394677)
- EC curve NIST P-224 is now allowed, still kept disabled in TLS due to less than optimal security

But apparently the patch was not applied at the end. It should be corrected now [1, 2].

And thx for the fix in Ruby :)

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1394677#c7
[2] http://pkgs.fedoraproject.org/cgit/rpms/openssl.git/commit/?id=3a8593870afda41424d6753c313bc0252090a248

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0