Hello community,
here is the log from the commit of package rubygem-activesupport-6.0 for
openSUSE:Factory checked in at 2020-05-28 09:19:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-6.0 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activesupport-6.0.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activesupport-6.0"
Thu May 28 09:19:06 2020 rev:7 rq:809488 version:6.0.3.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activesupport-6.0/rubygem-activesupport-6.0.changes
2020-05-11 13:38:55.648812410 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-activesupport-6.0.new.3606/rubygem-activesupport-6.0.changes
2020-05-28 09:19:08.645189559 +0200
@@ -1,0 +2,8 @@
+Wed May 27 11:03:01 UTC 2020 - Manuel Schnitzer <[email protected]>
+
+- updated to version 6.0.3.1
+
+ * CVE-2020-8165: Deprecate Marshal.load on raw cache read in RedisCacheStore
+ * CVE-2020-8165: Avoid Marshal.load on raw cache value in MemCacheStore
+
+-------------------------------------------------------------------
Old:
----
activesupport-6.0.3.gem
New:
----
activesupport-6.0.3.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activesupport-6.0.spec ++++++
--- /var/tmp/diff_new_pack.mKCZz2/_old 2020-05-28 09:19:09.249190665 +0200
+++ /var/tmp/diff_new_pack.mKCZz2/_new 2020-05-28 09:19:09.253190672 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-activesupport-6.0
-Version: 6.0.3
+Version: 6.0.3.1
Release: 0
%define mod_name activesupport
%define mod_full_name %{mod_name}-%{version}
++++++ activesupport-6.0.3.gem -> activesupport-6.0.3.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2020-05-06 20:00:05.000000000 +0200
+++ new/CHANGELOG.md 2020-05-18 17:45:55.000000000 +0200
@@ -1,3 +1,9 @@
+## Rails 6.0.3.1 (May 18, 2020) ##
+
+* [CVE-2020-8165] Deprecate Marshal.load on raw cache read in RedisCacheStore
+
+* [CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore
+
## Rails 6.0.3 (May 06, 2020) ##
* `Array#to_sentence` no longer returns a frozen string.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache/mem_cache_store.rb
new/lib/active_support/cache/mem_cache_store.rb
--- old/lib/active_support/cache/mem_cache_store.rb 2020-05-06
20:00:05.000000000 +0200
+++ new/lib/active_support/cache/mem_cache_store.rb 2020-05-18
17:45:55.000000000 +0200
@@ -7,7 +7,6 @@
raise e
end
-require "active_support/core_ext/marshal"
require "active_support/core_ext/array/extract_options"
module ActiveSupport
@@ -28,14 +27,6 @@
# Provide support for raw values in the local cache strategy.
module LocalCacheWithRaw # :nodoc:
private
- def read_entry(key, **options)
- entry = super
- if options[:raw] && local_cache && entry
- entry = deserialize_entry(entry.value)
- end
- entry
- end
-
def write_entry(key, entry, **options)
if options[:raw] && local_cache
raw_entry = Entry.new(entry.value.to_s)
@@ -194,9 +185,8 @@
key
end
- def deserialize_entry(raw_value)
- if raw_value
- entry = Marshal.load(raw_value) rescue raw_value
+ def deserialize_entry(entry)
+ if entry
entry.is_a?(Entry) ? entry : Entry.new(entry)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache/redis_cache_store.rb
new/lib/active_support/cache/redis_cache_store.rb
--- old/lib/active_support/cache/redis_cache_store.rb 2020-05-06
20:00:05.000000000 +0200
+++ new/lib/active_support/cache/redis_cache_store.rb 2020-05-18
17:45:55.000000000 +0200
@@ -74,14 +74,6 @@
# Support raw values in the local cache strategy.
module LocalCacheWithRaw # :nodoc:
private
- def read_entry(key, **options)
- entry = super
- if options[:raw] && local_cache && entry
- entry = deserialize_entry(entry.value)
- end
- entry
- end
-
def write_entry(key, entry, **options)
if options[:raw] && local_cache
raw_entry = Entry.new(serialize_entry(entry, raw: true))
@@ -348,7 +340,8 @@
# Read an entry from the cache.
def read_entry(key, **options)
failsafe :read_entry do
- deserialize_entry redis.with { |c| c.get(key) }
+ raw = options&.fetch(:raw, false)
+ deserialize_entry(redis.with { |c| c.get(key) }, raw: raw)
end
end
@@ -364,6 +357,7 @@
options = names.extract_options!
options = merged_options(options)
return {} if names == []
+ raw = options&.fetch(:raw, false)
keys = names.map { |name| normalize_key(name, options) }
@@ -373,7 +367,7 @@
names.zip(values).each_with_object({}) do |(name, value), results|
if value
- entry = deserialize_entry(value)
+ entry = deserialize_entry(value, raw: raw)
unless entry.nil? || entry.expired? ||
entry.mismatched?(normalize_version(name, options))
results[name] = entry.value
end
@@ -448,9 +442,20 @@
end
end
- def deserialize_entry(serialized_entry)
+ def deserialize_entry(serialized_entry, raw:)
if serialized_entry
entry = Marshal.load(serialized_entry) rescue serialized_entry
+
+ written_raw = serialized_entry.equal?(entry)
+ if raw != written_raw
+ ActiveSupport::Deprecation.warn(<<-MSG.squish)
+ Using a different value for the raw option when reading and
writing
+ to a cache key is deprecated for :redis_cache_store and Rails
6.0
+ will stop automatically detecting the format when reading to
avoid
+ marshal loading untrusted raw strings.
+ MSG
+ end
+
entry.is_a?(Entry) ? entry : Entry.new(entry)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/gem_version.rb
new/lib/active_support/gem_version.rb
--- old/lib/active_support/gem_version.rb 2020-05-06 20:00:05.000000000
+0200
+++ new/lib/active_support/gem_version.rb 2020-05-18 17:45:55.000000000
+0200
@@ -10,7 +10,7 @@
MAJOR = 6
MINOR = 0
TINY = 3
- PRE = nil
+ PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2020-05-06 20:00:05.000000000 +0200
+++ new/metadata 2020-05-18 17:45:55.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activesupport
version: !ruby/object:Gem::Version
- version: 6.0.3
+ version: 6.0.3.1
platform: ruby
authors:
- David Heinemeier Hansson
autorequire:
bindir: bin
cert_chain: []
-date: 2020-05-06 00:00:00.000000000 Z
+date: 2020-05-18 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: i18n
@@ -359,10 +359,10 @@
- MIT
metadata:
bug_tracker_uri: https://github.com/rails/rails/issues
- changelog_uri:
https://github.com/rails/rails/blob/v6.0.3/activesupport/CHANGELOG.md
- documentation_uri: https://api.rubyonrails.org/v6.0.3/
+ changelog_uri:
https://github.com/rails/rails/blob/v6.0.3.1/activesupport/CHANGELOG.md
+ documentation_uri: https://api.rubyonrails.org/v6.0.3.1/
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
- source_code_uri: https://github.com/rails/rails/tree/v6.0.3/activesupport
+ source_code_uri: https://github.com/rails/rails/tree/v6.0.3.1/activesupport
post_install_message:
rdoc_options:
- "--encoding"