Red Hat Security Advisory: rh-ror41 security update
🔗 CVE IDs covered (6)
📋 Description
CVE-2015-7576 — rubygem-actionpack: Timing attack vulnerability in basic authentication in Action Controller CVE-2015-7577 — rubygem-activerecord: Nested attributes rejection proc bypass in Active Record CVE-2015-7581 — rubygem-actionpack: Object leak vulnerability for wildcard controller routes in Action Pack CVE-2016-0751 — rubygem-actionpack: possible object leak and denial of service attack in Action Pack CVE-2016-0752 — rubygem-actionpack: directory traversal flaw in Action View CVE-2016-0753 — rubygem-activerecord: possible input validation circumvention in Active Model
🎯 Affected products120
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6)
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6)
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7)
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1)
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2)
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6)
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el6.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.2)
- rh-ror41-rubygem-actionpack-1:4.1.5-3.el7.src as a component of Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.6)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el6.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)
- rh-ror41-rubygem-actionpack-doc-1:4.1.5-3.el7.noarch as a component of Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.1)
- +90 more not shown
✅ Remediation
Before applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258 Workaround: Use following code to monkey-patch http_basic_authenticate_with method in ActionController: ~~~ module ActiveSupport module SecurityUtils def secure_compare(a, b) return false unless a.bytesize == b.bytesize l = a.unpack "C#{a.bytesize}" res = 0 b.each_byte { |byte| res |= byte ^ l.shift } res == 0 end module_function :secure_compare def variable_size_secure_compare(a, b) secure_compare(::Digest::SHA256.hexdigest(a), ::Digest::SHA256.hexdigest(b)) end module_function :variable_size_secure_compare end end module ActionController class Base def self.http_basic_authenticate_with(options = {}) before_action(options.except(:name, :password, :realm)) do authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password| # This comparison uses & so that it doesn't short circuit and # uses `variable_size_secure_compare` so that length information # isn't leaked. ActiveSupport::SecurityUtils.variable_size_secure_compare(name, options[:name]) & ActiveSupport::SecurityUtils.variable_size_secure_compare(password, options[:password]) end end end end end ~~~ Workaround: Use following code to monkey-patch mime types cache and disable caching. ``` require 'action_dispatch/http/mime_type' Mime.const_set :LOOKUP, Hash.new { |h,k| Mime::Type.new(k) unless k.blank? } ``` Alternatively perform filtering of mime types in the Accept header to allow only known types. Workaround: Avoid passing untrusted input to render method, or verify the input using whitelist before passing it to the render method: ``` def index render verify_template(params[:id]) end private def verify_template(name) # add verification logic particular to your application here end ``` Workaround: Do not allow arbitrary attributes to be passed to models. In Rails with Strong Parameters, make sure to not call permit! method, which bypasses strong parameters protections. Outside of rails, use whitelisting to filter only allowed attributes before passing them to models.
🔗 References (9)
- selfhttps://access.redhat.com/errata/RHSA-2016:0296
- externalhttps://access.redhat.com/security/updates/classification/#important
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301933
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301946
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301957
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301963
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301973
- externalhttps://bugzilla.redhat.com/show_bug.cgi?id=1301981
- selfhttps://security.access.redhat.com/data/csaf/v2/advisories/2016/rhsa-2016_0296.json