Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41fbc8bda7 |
12 changed files with 25 additions and 342 deletions
|
|
@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
|
|||
index d261ea57b5..3c13076b82 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3480,6 +3480,11 @@ AS_IF([test ${multiarch+set}], [
|
||||
@@ -3482,6 +3482,11 @@ AS_IF([test ${multiarch+set}], [
|
||||
])
|
||||
|
||||
archlibdir='${libdir}/${arch}'
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
|
|||
index c42436c23d..d261ea57b5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4319,7 +4319,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||
@@ -4321,7 +4321,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||
ruby_version_dir=/'${ruby_version_dir_name}'
|
||||
|
||||
if test -z "${ruby_version_dir_name}"; then
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
|
|||
index 3c13076b82..93af30321d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4383,6 +4383,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
@@ -4385,6 +4385,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
|
||||
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
|
|||
index 93af30321d..bc13397e0e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4355,6 +4355,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
@@ -4357,6 +4357,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||
[vendorarchdir=$withval],
|
||||
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ index 93af30321d..bc13397e0e 100644
|
|||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
RUBY_EXEC_PREFIX=''
|
||||
@@ -4379,6 +4383,7 @@ AC_SUBST(sitearchdir)dnl
|
||||
@@ -4381,6 +4385,7 @@ AC_SUBST(sitearchdir)dnl
|
||||
AC_SUBST(vendordir)dnl
|
||||
AC_SUBST(vendorlibdir)dnl
|
||||
AC_SUBST(vendorarchdir)dnl
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac
|
|||
index 80b137e380..63cd3b4f8b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4269,9 +4269,6 @@ AS_CASE(["$target_os"],
|
||||
@@ -4271,9 +4271,6 @@ AS_CASE(["$target_os"],
|
||||
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
||||
])
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|||
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
||||
AC_ARG_WITH(rubyarchprefix,
|
||||
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
||||
@@ -4294,57 +4291,63 @@ AC_ARG_WITH(ridir,
|
||||
@@ -4296,57 +4293,63 @@ AC_ARG_WITH(ridir,
|
||||
AC_SUBST(ridir)
|
||||
AC_SUBST(RI_BASE_NAME)
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ index 80b137e380..63cd3b4f8b 100644
|
|||
|
||||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||
@@ -4361,6 +4364,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
@@ -4363,6 +4366,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||
AC_SUBST(arch)dnl
|
||||
AC_SUBST(sitearch)dnl
|
||||
AC_SUBST(ruby_version)dnl
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ diff --git a/common.mk b/common.mk
|
|||
index d55d1788aa..73755f6ccd 100644
|
||||
--- a/common.mk
|
||||
+++ b/common.mk
|
||||
@@ -1607,8 +1607,6 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST)
|
||||
@@ -1601,8 +1601,6 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST)
|
||||
$(ACTIONS_ENDGROUP)
|
||||
no-test-syntax-suggest:
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ index f35fad6a362611..0da15772d36671 100644
|
|||
AC_CACHE_CHECK([whether compiler has statement and declarations in expressions],
|
||||
rb_cv_have_stmt_and_decl_in_expr,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[ __extension__ ({ int a = 0; a; }); ]])],
|
||||
@@ -4213,12 +4270,13 @@ AS_IF([test "${ARCH_FLAG}"], [
|
||||
@@ -4215,12 +4272,13 @@ AS_IF([test "${ARCH_FLAG}"], [
|
||||
rb_cv_warnflags=`echo "$rb_cv_warnflags" | sed 's/^ *//;s/ *$//'`
|
||||
warnflags="$rb_cv_warnflags"
|
||||
AC_SUBST(cppflags)dnl
|
||||
|
|
@ -186,7 +186,7 @@ index f35fad6a362611..0da15772d36671 100644
|
|||
AC_SUBST(XCFLAGS)dnl
|
||||
AC_SUBST(XLDFLAGS)dnl
|
||||
AC_SUBST(EXTLDFLAGS)dnl
|
||||
@@ -4686,6 +4744,7 @@ config_summary "DLDFLAGS" "$DLDFLAGS"
|
||||
@@ -4688,6 +4746,7 @@ config_summary "DLDFLAGS" "$DLDFLAGS"
|
||||
config_summary "optflags" "$optflags"
|
||||
config_summary "debugflags" "$debugflags"
|
||||
config_summary "warnflags" "$warnflags"
|
||||
|
|
@ -255,7 +255,7 @@ diff --git a/template/Makefile.in b/template/Makefile.in
|
|||
index 033ac56cb38886..abb4469777ce8a 100644
|
||||
--- a/template/Makefile.in
|
||||
+++ b/template/Makefile.in
|
||||
@@ -90,6 +90,7 @@ cflags = @cflags@
|
||||
@@ -89,6 +89,7 @@ cflags = @cflags@
|
||||
optflags = @optflags@
|
||||
debugflags = @debugflags@
|
||||
warnflags = @warnflags@ @strict_warnflags@
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
From 570582fb78bc4adaafba44f47465507f649fa9dc Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Thu, 5 Sep 2024 20:06:37 +0200
|
||||
Subject: [PATCH] [ruby/openssl] Fix test_provider.rb in FIPS.
|
||||
|
||||
https://github.com/ruby/openssl/commit/7bdbc52100
|
||||
---
|
||||
test/openssl/test_provider.rb | 25 ++++++++++++++++++-------
|
||||
1 file changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/test/openssl/test_provider.rb b/test/openssl/test_provider.rb
|
||||
index 4e050b4bc2..e27968602a 100644
|
||||
--- a/test/openssl/test_provider.rb
|
||||
+++ b/test/openssl/test_provider.rb
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
require_relative 'utils'
|
||||
-if defined?(OpenSSL) && defined?(OpenSSL::Provider) && !OpenSSL.fips_mode
|
||||
+if defined?(OpenSSL) && defined?(OpenSSL::Provider)
|
||||
|
||||
class OpenSSL::TestProvider < OpenSSL::TestCase
|
||||
def test_openssl_provider_name_inspect
|
||||
@@ -12,14 +12,22 @@ def test_openssl_provider_name_inspect
|
||||
end
|
||||
|
||||
def test_openssl_provider_names
|
||||
+ # We expect the following providers are loaded in the cases:
|
||||
+ # * Non-FIPS: default
|
||||
+ # * FIPS: fips, base
|
||||
+ # Use the null provider to test the added provider.
|
||||
+ # See provider(7) - OPENSSL PROVIDERS to see the list of providers, and
|
||||
+ # OSSL_PROVIDER-null(7) to check the details of the null provider.
|
||||
with_openssl <<-'end;'
|
||||
- base_provider = OpenSSL::Provider.load("base")
|
||||
- assert_equal(2, OpenSSL::Provider.provider_names.size)
|
||||
- assert_includes(OpenSSL::Provider.provider_names, "base")
|
||||
+ num = OpenSSL::Provider.provider_names.size
|
||||
|
||||
- assert_equal(true, base_provider.unload)
|
||||
- assert_equal(1, OpenSSL::Provider.provider_names.size)
|
||||
- assert_not_includes(OpenSSL::Provider.provider_names, "base")
|
||||
+ added_provider = OpenSSL::Provider.load("null")
|
||||
+ assert_equal(num + 1, OpenSSL::Provider.provider_names.size)
|
||||
+ assert_includes(OpenSSL::Provider.provider_names, "null")
|
||||
+
|
||||
+ assert_equal(true, added_provider.unload)
|
||||
+ assert_equal(num, OpenSSL::Provider.provider_names.size)
|
||||
+ assert_not_includes(OpenSSL::Provider.provider_names, "null")
|
||||
end;
|
||||
end
|
||||
|
||||
@@ -33,6 +41,9 @@ def test_unloaded_openssl_provider
|
||||
end
|
||||
|
||||
def test_openssl_legacy_provider
|
||||
+ # The legacy provider is not supported on FIPS.
|
||||
+ omit_on_fips
|
||||
+
|
||||
with_openssl(<<-'end;')
|
||||
begin
|
||||
OpenSSL::Provider.load("legacy")
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
From 113727fa85749a9625838e378dcd4a749d40b0c5 Mon Sep 17 00:00:00 2001
|
||||
From: Jun Aruga <jaruga@redhat.com>
|
||||
Date: Tue, 8 Apr 2025 15:03:06 +0200
|
||||
Subject: [PATCH] Fix the tests using SHA-1 Probabilistic Signature Scheme
|
||||
(PSS) parameters.
|
||||
|
||||
Fedora OpenSSL 3.5 on rawhide stopped accepting SHA-1 PSS[1] parameters.
|
||||
This is different from the SHA-1 signatures which Fedora OpenSSL stopped
|
||||
accepting since Fedora 41.[2]
|
||||
|
||||
This commit fixes the following test failures related to the SHA-1 PSS
|
||||
parameters with Fedora OpenSSL 3.5.
|
||||
Note these failures are the downstream Fedora OpenSSL RPM specific. The tests
|
||||
pass without this commit with the upstream OpenSSL 3.5.
|
||||
|
||||
```
|
||||
$ rpm -q openssl-libs openssl-devel
|
||||
openssl-libs-3.5.0-2.fc43.x86_64
|
||||
openssl-devel-3.5.0-2.fc43.x86_64
|
||||
|
||||
$ bundle exec rake test
|
||||
...
|
||||
E
|
||||
===============================================================================================
|
||||
Error: test_sign_verify_options(OpenSSL::TestPKeyRSA): OpenSSL::PKey::PKeyError: EVP_PKEY_CTX_ctrl_str(ctx, "rsa_mgf1_md", "SHA1"): digest not allowed (digest=SHA1)
|
||||
/mnt/git/ruby/openssl/test/openssl/test_pkey_rsa.rb:113:in 'Hash#each'
|
||||
/mnt/git/ruby/openssl/test/openssl/test_pkey_rsa.rb:113:in 'OpenSSL::PKey::PKey#sign'
|
||||
/mnt/git/ruby/openssl/test/openssl/test_pkey_rsa.rb:113:in 'OpenSSL::TestPKeyRSA#test_sign_verify_options'
|
||||
110: "rsa_pss_saltlen" => 20,
|
||||
111: "rsa_mgf1_md" => "SHA1"
|
||||
112: }
|
||||
=> 113: sig_pss = key.sign("SHA256", data, pssopts)
|
||||
114: assert_equal 256, sig_pss.bytesize
|
||||
115: assert_equal true, key.verify("SHA256", sig_pss, data, pssopts)
|
||||
116: assert_equal true, key.verify_pss("SHA256", sig_pss, data,
|
||||
===============================================================================================
|
||||
E
|
||||
===============================================================================================
|
||||
Error: test_sign_verify_pss(OpenSSL::TestPKeyRSA): OpenSSL::PKey::RSAError: digest not allowed (digest=SHA1)
|
||||
/mnt/git/ruby/openssl/test/openssl/test_pkey_rsa.rb:191:in 'OpenSSL::PKey::RSA#sign_pss'
|
||||
/mnt/git/ruby/openssl/test/openssl/test_pkey_rsa.rb:191:in 'OpenSSL::TestPKeyRSA#test_sign_verify_pss'
|
||||
188: data = "Sign me!"
|
||||
189: invalid_data = "Sign me?"
|
||||
190:
|
||||
=> 191: signature = key.sign_pss("SHA256", data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
192: assert_equal 256, signature.bytesize
|
||||
193: assert_equal true,
|
||||
194: key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
===============================================================================================
|
||||
...
|
||||
577 tests, 4186 assertions, 0 failures, 2 errors, 0 pendings, 3 omissions, 0 notifications
|
||||
```
|
||||
|
||||
[1] https://en.wikipedia.org/wiki/Probabilistic_signature_scheme
|
||||
[2] https://fedoraproject.org/wiki/Changes/OpenSSLDistrustSHA1SigVer
|
||||
---
|
||||
test/openssl/test_pkey_rsa.rb | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
|
||||
index 61c55c60b2..9661cef419 100644
|
||||
--- a/test/openssl/test_pkey_rsa.rb
|
||||
+++ b/test/openssl/test_pkey_rsa.rb
|
||||
@@ -99,13 +99,13 @@ def test_sign_verify_options
|
||||
pssopts = {
|
||||
"rsa_padding_mode" => "pss",
|
||||
"rsa_pss_saltlen" => 20,
|
||||
- "rsa_mgf1_md" => "SHA1"
|
||||
+ "rsa_mgf1_md" => "SHA256"
|
||||
}
|
||||
sig_pss = key.sign("SHA256", data, pssopts)
|
||||
assert_equal 128, sig_pss.bytesize
|
||||
assert_equal true, key.verify("SHA256", sig_pss, data, pssopts)
|
||||
assert_equal true, key.verify_pss("SHA256", sig_pss, data,
|
||||
- salt_length: 20, mgf1_hash: "SHA1")
|
||||
+ salt_length: 20, mgf1_hash: "SHA256")
|
||||
# Defaults to PKCS #1 v1.5 padding => verification failure
|
||||
assert_equal false, key.verify("SHA256", sig_pss, data)
|
||||
|
||||
@@ -179,31 +179,31 @@ def test_sign_verify_pss
|
||||
data = "Sign me!"
|
||||
invalid_data = "Sign me?"
|
||||
|
||||
- signature = key.sign_pss("SHA256", data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
+ signature = key.sign_pss("SHA256", data, salt_length: 20, mgf1_hash: "SHA256")
|
||||
assert_equal 128, signature.bytesize
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA256")
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA256")
|
||||
assert_equal false,
|
||||
- key.verify_pss("SHA256", signature, invalid_data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, invalid_data, salt_length: 20, mgf1_hash: "SHA256")
|
||||
|
||||
- signature = key.sign_pss("SHA256", data, salt_length: :digest, mgf1_hash: "SHA1")
|
||||
+ signature = key.sign_pss("SHA256", data, salt_length: :digest, mgf1_hash: "SHA256")
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: 32, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: 32, mgf1_hash: "SHA256")
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA256")
|
||||
assert_equal false,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: 20, mgf1_hash: "SHA256")
|
||||
|
||||
- signature = key.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA1")
|
||||
+ signature = key.sign_pss("SHA256", data, salt_length: :max, mgf1_hash: "SHA256")
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: 94, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: 94, mgf1_hash: "SHA256")
|
||||
assert_equal true,
|
||||
- key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA1")
|
||||
+ key.verify_pss("SHA256", signature, data, salt_length: :auto, mgf1_hash: "SHA256")
|
||||
|
||||
assert_raise(OpenSSL::PKey::RSAError) {
|
||||
- key.sign_pss("SHA256", data, salt_length: 95, mgf1_hash: "SHA1")
|
||||
+ key.sign_pss("SHA256", data, salt_length: 95, mgf1_hash: "SHA256")
|
||||
}
|
||||
end
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
||||
64
ruby.spec
64
ruby.spec
|
|
@ -1,6 +1,6 @@
|
|||
%global major_version 3
|
||||
%global minor_version 3
|
||||
%global teeny_version 10
|
||||
%global teeny_version 7
|
||||
%global major_minor_version %{major_version}.%{minor_version}
|
||||
|
||||
%global ruby_version %{major_minor_version}.%{teeny_version}
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
%global abbrev_version 0.1.2
|
||||
%global base64_version 0.2.0
|
||||
%global benchmark_version 0.3.0
|
||||
%global cgi_version 0.4.2
|
||||
%global cgi_version 0.4.1
|
||||
%global csv_version 3.2.8
|
||||
%global date_version 3.3.4
|
||||
%global delegate_version 0.3.1
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
%global digest_version 3.1.1
|
||||
%global drb_version 2.2.0
|
||||
%global english_version 0.8.0
|
||||
%global erb_version 4.0.3.1
|
||||
%global erb_version 4.0.3
|
||||
%global error_highlight_version 0.6.0
|
||||
%global etc_version 1.4.3
|
||||
%global fcntl_version 1.1.0
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
%global nkf_version 0.1.3
|
||||
%global observer_version 0.1.2
|
||||
%global open3_version 0.2.1
|
||||
%global openssl_version 3.2.2
|
||||
%global openssl_version 3.2.0
|
||||
%global open_uri_version 0.4.1
|
||||
%global optparse_version 0.4.0
|
||||
%global ostruct_version 0.6.0
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
%global pstore_version 0.1.3
|
||||
%global readline_version 0.0.4
|
||||
%global reline_version 0.5.10
|
||||
%global resolv_version 0.3.1
|
||||
%global resolv_version 0.3.0
|
||||
%global resolv_replace_version 0.1.1
|
||||
%global rinda_version 0.2.0
|
||||
%global ruby2_keywords_version 0.0.5
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
%global tmpdir_version 0.2.0
|
||||
%global tsort_version 0.2.0
|
||||
%global un_version 0.3.0
|
||||
%global uri_version 0.13.3
|
||||
%global uri_version 0.13.1
|
||||
%global weakref_version 0.1.3
|
||||
%global win32ole_version 1.8.10
|
||||
%global yaml_version 0.3.0
|
||||
|
|
@ -125,9 +125,9 @@
|
|||
# Bundled gems.
|
||||
%global debug_version 1.9.2
|
||||
%global net_ftp_version 0.3.4
|
||||
%global net_imap_version 0.4.21
|
||||
%global net_imap_version 0.4.9.1
|
||||
%global net_pop_version 0.1.2
|
||||
%global net_smtp_version 0.5.1
|
||||
%global net_smtp_version 0.4.0.1
|
||||
%global matrix_version 0.4.2
|
||||
%global minitest_version 5.20.0
|
||||
%global power_assert_version 2.0.3
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
%global racc_version 1.7.3
|
||||
%global rake_version 13.1.0
|
||||
%global rbs_version 3.4.0
|
||||
%global rexml_version 3.4.4
|
||||
%global rexml_version 3.3.9
|
||||
%global rss_version 0.3.1
|
||||
%global test_unit_version 3.6.1
|
||||
%global typeprof_version 0.21.9
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
Summary: An interpreter of object-oriented scripting language
|
||||
Name: ruby
|
||||
Version: %{ruby_version}%{?development_release}
|
||||
Release: 12%{?dist}
|
||||
Release: 9%{?dist}
|
||||
# Licenses, which are likely not included in binary RPMs:
|
||||
# Apache-2.0:
|
||||
# benchmark/gc/redblack.rb
|
||||
|
|
@ -189,10 +189,9 @@ Release: 12%{?dist}
|
|||
# https://github.com/flori/json/issues/277
|
||||
# https://github.com/flori/json/pull/567
|
||||
#
|
||||
# IETF (this is not official SPDX identifier)
|
||||
# Licenses under review:
|
||||
# .bundle/gems/net-imap-0.4.9/LICENSE.txt
|
||||
# Licenses in this file covers fair use and don't need to be listed:
|
||||
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/506
|
||||
# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/506
|
||||
#
|
||||
# BSD-3-Clause: missing/{crypt,mt19937,setproctitle}.c, addr2line.c:2652
|
||||
# CC0: ccan/{build_assert/build_assert.h,check_type/check_type.h,
|
||||
|
|
@ -286,19 +285,6 @@ Patch12: ruby-3.4.0-Extract-hardening-CFLAGS-to-a-special-hardenflags-variable.p
|
|||
# https://github.com/ruby/openssl/pull/710
|
||||
# https://github.com/ruby/ruby/commit/6213ab1a51387fd9cdcb5e87908722f3bbdf78cb
|
||||
Patch13: ruby-3.4.0-openssl-respect-crypto-policies-tls-min.patch
|
||||
# Fix test_provider.rb in FIPS.
|
||||
# https://github.com/ruby/openssl/pull/794
|
||||
# https://github.com/ruby/ruby/commit/ad742de79bcce53290005429868f63c51cbeb0f2
|
||||
Patch15: ruby-3.4.0-openssl-fix-test-provider-in-fips.patch
|
||||
# Fix the tests using SHA-1 Probabilistic Signature Scheme (PSS) parameters.
|
||||
# https://github.com/ruby/openssl/pull/879
|
||||
Patch16: ruby-3.4.2-openssl-Fix-SHA-1-PSS-tests.patch
|
||||
# Fix arbitrary code execution via deserialization bypass in ERB. (CVE-2026-41316)
|
||||
# Include the version bump here as that's the only change from 4.0.3 to 4.0.3.1
|
||||
# and is expected to be included in next Ruby 3.3.
|
||||
# https://github.com/ruby/ruby/commit/a53f3d57d1c70f35534c457de2c471d84a55956a
|
||||
# https://github.com/ruby/ruby/commit/2f223e90edf40f5d537760cb26c77b608bddff36
|
||||
Patch17: rubygem-erb-4.0.3.1-Fix-arbitrary-code-execution-via-deserialization-bypass-CVE-2026-41316.patch
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
%{?with_rubypick:Suggests: rubypick}
|
||||
|
|
@ -780,9 +766,6 @@ analysis result in RBS format, a standard type description format for Ruby
|
|||
%patch 9 -p1
|
||||
%patch 12 -p1
|
||||
%patch 13 -p1
|
||||
%patch 15 -p1
|
||||
%patch 16 -p1
|
||||
%patch 17 -p1
|
||||
|
||||
# Provide an example of usage of the tapset:
|
||||
cp -a %{SOURCE3} .
|
||||
|
|
@ -1630,15 +1613,12 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
|
|||
# net-imap
|
||||
%dir %{gem_instdir net-imap}
|
||||
%{gem_instdir net-imap}/Gemfile
|
||||
%license %{gem_instdir net-imap}/BSDL
|
||||
%license %{gem_instdir net-imap}/COPYING
|
||||
%license %{gem_instdir net-imap}/LICENSE.txt
|
||||
%doc %{gem_instdir net-imap}/README.md
|
||||
%{gem_instdir net-imap}/Rakefile
|
||||
%{gem_instdir net-imap}/docs
|
||||
%{gem_libdir net-imap}
|
||||
%{gem_instdir net-imap}/rakelib
|
||||
%{gem_instdir net-imap}/sample
|
||||
%{gem_spec net-imap}
|
||||
|
||||
# net-pop
|
||||
|
|
@ -1788,26 +1768,6 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 28 2026 Jarek Prokop <jprokop@redhat.com> - 3.3.10-12
|
||||
- Fix arbitrary code execution via deserialization bypass in ERB. (CVE-2026-41316)
|
||||
Resolves: RHEL-171246
|
||||
|
||||
* Thu Nov 13 2025 Jun Aruga <jaruga@redhat.com> - 3.3.10-11
|
||||
- Upgrade to Ruby 3.3.10.
|
||||
Resolves: RHEL-130160
|
||||
- Fix possible denial of service in resolv gem (CVE-2025-24294)
|
||||
- Fix URI Credential Leakage Bypass previous fixes. (CVE-2025-61594)
|
||||
- Fix REXML denial of service. (CVE-2025-58767)
|
||||
Resolves: RHEL-122028
|
||||
|
||||
* Mon Apr 14 2025 Jarek Prokop <jprokop@redhat.com> - 3.3.8-10
|
||||
- Upgrade to Ruby 3.3.8.
|
||||
Resolves: RHEL-87342
|
||||
- Fix Net::IMAP vulnerable to possible DoS by memory exhaustion. (CVE-2025-25186)
|
||||
- Fix Denial of Service in CGI::Cookie.parse. (CVE-2025-27219)
|
||||
Resolves: RHEL-86116
|
||||
- Fix userinfo leakage in URI#join, URI#merge and URI#+. (CVE-2025-27221)
|
||||
|
||||
* Thu Jan 30 2025 Jun Aruga <jaruga@redhat.com> - 3.3.7-9
|
||||
- Upgrade to Ruby 3.3.7
|
||||
Resolves: RHEL-77994
|
||||
|
|
|
|||
|
|
@ -1,90 +0,0 @@
|
|||
From a53f3d57d1c70f35534c457de2c471d84a55956a Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Kokubun <takashikkbn@gmail.com>
|
||||
Date: Tue, 21 Apr 2026 16:27:44 +0900
|
||||
Subject: [PATCH 1/2] [ruby/erb] Prohibit def_method on marshal-loaded ERB
|
||||
instances
|
||||
|
||||
Extends the @_init guard to def_method so that an ERB object created
|
||||
via Marshal.load (which bypasses initialize) raises ArgumentError
|
||||
instead of evaluating arbitrary source. def_module and def_class both
|
||||
delegate to def_method and are covered by the same check.
|
||||
|
||||
Co-authored-by: Tristan Madani <TristanInSec@gmail.com>
|
||||
---
|
||||
lib/erb.rb | 3 +++
|
||||
test/erb/test_erb.rb | 27 +++++++++++++++++++++++++++
|
||||
2 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/lib/erb.rb b/lib/erb.rb
|
||||
index bc1615d7da..a7317c0856 100644
|
||||
--- a/lib/erb.rb
|
||||
+++ b/lib/erb.rb
|
||||
@@ -463,6 +463,9 @@ def new_toplevel(vars = nil)
|
||||
# erb.def_method(MyClass, 'render(arg1, arg2)', filename)
|
||||
# print MyClass.new.render('foo', 123)
|
||||
def def_method(mod, methodname, fname='(ERB)')
|
||||
+ unless @_init.equal?(self.class.singleton_class)
|
||||
+ raise ArgumentError, "not initialized"
|
||||
+ end
|
||||
src = self.src.sub(/^(?!#|$)/) {"def #{methodname}\n"} << "\nend\n"
|
||||
mod.module_eval do
|
||||
eval(src, binding, fname, -1)
|
||||
diff --git a/test/erb/test_erb.rb b/test/erb/test_erb.rb
|
||||
index 555345a140..1266b64e41 100644
|
||||
--- a/test/erb/test_erb.rb
|
||||
+++ b/test/erb/test_erb.rb
|
||||
@@ -714,6 +714,33 @@ def test_prohibited_marshal_load
|
||||
assert_raise(ArgumentError) {erb.result}
|
||||
end
|
||||
|
||||
+ def test_prohibited_marshal_load_def_method
|
||||
+ erb = ERB.allocate
|
||||
+ erb.instance_variable_set(:@src, "")
|
||||
+ erb.instance_variable_set(:@lineno, 1)
|
||||
+ erb.instance_variable_set(:@_init, true)
|
||||
+ erb = Marshal.load(Marshal.dump(erb))
|
||||
+ assert_raise(ArgumentError) {erb.def_method(Class.new, 'render')}
|
||||
+ end
|
||||
+
|
||||
+ def test_prohibited_marshal_load_def_module
|
||||
+ erb = ERB.allocate
|
||||
+ erb.instance_variable_set(:@src, "")
|
||||
+ erb.instance_variable_set(:@lineno, 1)
|
||||
+ erb.instance_variable_set(:@_init, true)
|
||||
+ erb = Marshal.load(Marshal.dump(erb))
|
||||
+ assert_raise(ArgumentError) {erb.def_module}
|
||||
+ end
|
||||
+
|
||||
+ def test_prohibited_marshal_load_def_class
|
||||
+ erb = ERB.allocate
|
||||
+ erb.instance_variable_set(:@src, "")
|
||||
+ erb.instance_variable_set(:@lineno, 1)
|
||||
+ erb.instance_variable_set(:@_init, true)
|
||||
+ erb = Marshal.load(Marshal.dump(erb))
|
||||
+ assert_raise(ArgumentError) {erb.def_class}
|
||||
+ end
|
||||
+
|
||||
def test_multi_line_comment_lineno
|
||||
erb = ERB.new(<<~EOS)
|
||||
<%= __LINE__ %>
|
||||
|
||||
From 2f223e90edf40f5d537760cb26c77b608bddff36 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Kokubun <takashikkbn@gmail.com>
|
||||
Date: Tue, 21 Apr 2026 17:14:06 +0900
|
||||
Subject: [PATCH 2/2] [ruby/erb] Version 4.0.3.1
|
||||
|
||||
---
|
||||
lib/erb/version.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/erb/version.rb b/lib/erb/version.rb
|
||||
index 295fc5fa6f..85e2a79def 100644
|
||||
--- a/lib/erb/version.rb
|
||||
+++ b/lib/erb/version.rb
|
||||
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
class ERB
|
||||
- VERSION = '4.0.3'
|
||||
+ VERSION = '4.0.3.1'
|
||||
private_constant :VERSION
|
||||
end
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (ruby-3.3.10.tar.xz) = 8b81cab7b98acb6ff7bdf864da5e97596ee1efa441e2a65991e12a7e3f3ad3d83b1b5c65ae108484252ec8f6d85db60eb381a174c759023beb202b5a0d20818a
|
||||
SHA512 (ruby-3.3.7.tar.xz) = 4082a7684c1b0d53a0ce493f79568e851d37a864f59c58b2e0c273b2659e0ca75318ddff939fdf5e9d0a3eeba1b6d8f03bf88afb49a5ffd77714f1c8a7dfdd55
|
||||
|
|
|
|||
Loading…
Reference in a new issue