diff --git a/SOURCES/ruby-2.2.3-dsym_fstrs-for-object-allocation-gc-phase.patch b/SOURCES/ruby-2.2.3-dsym_fstrs-for-object-allocation-gc-phase.patch new file mode 100644 index 0000000..22ab89a --- /dev/null +++ b/SOURCES/ruby-2.2.3-dsym_fstrs-for-object-allocation-gc-phase.patch @@ -0,0 +1,31 @@ +From c4e2e5df814e77bfa19dc3ee5e5f907e4f368db9 Mon Sep 17 00:00:00 2001 +From: nagachika +Date: Thu, 14 May 2015 20:12:59 +0000 +Subject: [PATCH] merge revision(s) 49842: [Backport #10933] + + * symbol.c (Init_sym): make dsym_fstrs a hash compared by identity + as the keys are unique fstrings, to get rid of running hash and + compare methods and causing new object allocation during garbage + collection phase. [ruby-dev:48891] [Bug #10933] + + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + symbol.c | 2 +- + version.h | 6 +++--- + 3 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/symbol.c b/symbol.c +index 1127020..696f017 100644 +--- a/symbol.c ++++ b/symbol.c +@@ -122,7 +122,7 @@ static const struct st_hash_type symhash = { + void + Init_sym(void) + { +- VALUE dsym_fstrs = rb_hash_new(); ++ VALUE dsym_fstrs = rb_ident_hash_new(); + global_symbols.dsymbol_fstr_hash = dsym_fstrs; + rb_gc_register_mark_object(dsym_fstrs); + rb_obj_hide(dsym_fstrs); diff --git a/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch b/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch new file mode 100644 index 0000000..7ac2a48 --- /dev/null +++ b/SOURCES/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch @@ -0,0 +1,25 @@ +From d000290a675745d9fb8a4658b8b5922f6a734522 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 16 Jun 2015 08:22:47 +0200 +Subject: [PATCH] Increase DH key size (fixes #1289). + +This fixes compatibility with OpenSLL 1.0.2c+: + +https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/ +--- + test/rubygems/test_gem_remote_fetcher.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb +index 6b29e18..c318870 100644 +--- a/test/rubygems/test_gem_remote_fetcher.rb ++++ b/test/rubygems/test_gem_remote_fetcher.rb +@@ -898,7 +898,7 @@ def start_ssl_server(config = {}) + server.mount_proc("/insecure_redirect") { |req, res| + res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to']) + } +- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 } ++ server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 2048 } + t = Thread.new do + begin + server.start diff --git a/SPECS/ruby.spec b/SPECS/ruby.spec index 377a696..012070f 100644 --- a/SPECS/ruby.spec +++ b/SPECS/ruby.spec @@ -24,7 +24,7 @@ %endif -%global release 12 +%global release 15 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -121,6 +121,13 @@ Patch7: rubygems-2.2.4-Limit-API-endpoint-to-original-security-domain.patch # Incomplete fix for CVE-2015-3900 (CVE-2015-4020). # https://github.com/rubygems/rubygems/commit/5c7bfb5 Patch8: rubygems-2.2.5-Fix-API-endpoint-domain-clamping.patch +# Fix the bug for object allocation during gc phase. +# https://bugzilla.redhat.com/show_bug.cgi?id=1317076 +# https://github.com/ruby/ruby/commit/c4e2e5d.patch +Patch9: ruby-2.2.3-dsym_fstrs-for-object-allocation-gc-phase.patch +# Fix "dh key too small" error of OpenSSL 1.0.2c+. +# https://github.com/rubygems/rubygems/issues/1289 +Patch10: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch Requires: %{?scl_prefix}%{pkg_name}-libs%{?_isa} = %{version}-%{release} Requires: %{?scl_prefix}ruby(rubygems) >= %{rubygems_version} @@ -427,6 +434,8 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 # Allow to use autoconf 2.63. sed -i '/AC_PREREQ/ s/(.*)/(2.62)/' configure.in @@ -924,10 +933,18 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jun 22 2016 Jun Aruga - 2.2.2-15 +- Fix for "dh key too small" error of OpenSSL 1.0.2+. + Resolves: rhbz#1348918 + +* Tue Jun 14 2016 Jun Aruga - 2.2.2-13 +- Fix the bug for object allocation during gc phase. + Resolves: rhbz#1317076 + * Mon Aug 10 2015 Vít Ondruch - 2.2.2-12 - Fix DNS hijacking vulnerability in api_endpoint() (CVE-2015-3900, CVE-2015-4020). - Resolves: rhbz#1251465 + Resolves: rhbz#1251466 * Tue Apr 28 2015 Josef Stribny - 2.2.2-11 - Update to Ruby 2.2.2