Bug 1301946 (CVE-2016-0751) - CVE-2016-0751 rubygem-actionpack: possible object leak and denial of service attack in Action Pack
Summary: CVE-2016-0751 rubygem-actionpack: possible object leak and denial of service ...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-0751
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1301947 1301948 1302002 1306275 1306276 1306277 1306278 1306279 1306281
Blocks: 1302006
TreeView+ depends on / blocked
 
Reported: 2016-01-26 12:21 UTC by Adam Mariš
Modified: 2021-06-02 06:20 UTC (History)
41 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-03-15 21:22:43 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0296 0 normal SHIPPED_LIVE Important: rh-ror41 security update 2016-02-24 15:36:00 UTC
Red Hat Product Errata RHSA-2016:0454 0 normal SHIPPED_LIVE Important: ror40 security update 2016-03-16 00:56:17 UTC
Red Hat Product Errata RHSA-2016:0455 0 normal SHIPPED_LIVE Important: ruby193 security update 2016-03-16 00:55:59 UTC

Description Adam Mariš 2016-01-26 12:21:13 UTC
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 12:22:25 UTC
Created rubygem-rails tracking bugs for this issue:

Affects: fedora-all [bug 1301948]

Comment 10 errata-xmlrpc 2016-02-24 10:36:55 UTC
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 08:25:56 UTC
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 12:25:54 UTC
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 21:00:02 UTC
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 21:02:54 UTC
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

Comment 15 Stephen Herr 2017-12-02 00:11:57 UTC
Mitigation:

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.


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