Bug 1301946 - (CVE-2016-0751) CVE-2016-0751 rubygem-actionpack: possible object leak and denial of service attack in Action Pack
CVE-2016-0751 rubygem-actionpack: possible object leak and denial of service ...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20160125,repor...
: Security
Depends On: 1301947 1301948 1302002 1306275 1306276 1306277 1306278 1306279 1306281
Blocks: 1302006
  Show dependency treegraph
 
Reported: 2016-01-26 07:21 EST by Adam Mariš
Modified: 2016-03-15 17:22 EDT (History)
40 users (show)

See Also:
Fixed In Version: rubygem-actionpack 5.0.0.beta1.1, rubygem-actionpack 4.2.5.1, rubygem-actionpack 4.1.14.1, rubygem-actionpack 3.2.22.1
Doc Type: Bug Fix
Doc Text:
A flaw was found in the way the Action Pack component performed MIME type lookups. Since queries were cached in a global cache of MIME types, an attacker could use this flaw to grow the cache indefinitely, potentially resulting in a denial of service.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-15 17:22:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2016-01-26 07:21:13 EST
It was reported that carefully crafted accept header can cause a global cache of mime types to grow indefinitely which can lead to a possible denial of service attack in Action Pack. 

External References:

https://groups.google.com/forum/#!msg/rubyonrails-security/9oLY_FCzvoc/w9oI9XxbFQAJ
http://weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released/
Comment 2 Adam Mariš 2016-01-26 07:22:25 EST
Created rubygem-rails tracking bugs for this issue:

Affects: fedora-all [bug 1301948]
Comment 4 Adam Mariš 2016-01-26 10:22:49 EST
Acknowledgments:

Red Hat would like to thank the Ruby on Rails project for reporting this issue. Upstream acknowledges Aaron Patterson of Red Hat as the original reporter.
Comment 6 Ján Rusnačko 2016-02-09 08:52:06 EST
Mitigation:

Use following code to monkey-patch mime types cache and disable caching.

``` ruby
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.
Comment 10 errata-xmlrpc 2016-02-24 05:36:55 EST
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6

Via RHSA-2016:0296 https://rhn.redhat.com/errata/RHSA-2016-0296.html
Comment 11 Fedora Update System 2016-02-28 03:25:56 EST
rubygem-actionpack-4.2.0-3.fc22, rubygem-activemodel-4.2.0-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-02-28 07:25:54 EST
rubygem-actionpack-4.2.3-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 errata-xmlrpc 2016-03-15 17:00:02 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0455 https://rhn.redhat.com/errata/RHSA-2016-0455.html
Comment 14 errata-xmlrpc 2016-03-15 17:02:54 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0454 https://rhn.redhat.com/errata/RHSA-2016-0454.html

Note You need to log in before you can comment on or make changes to this bug.