Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1365017 - (CVE-2016-6317) CVE-2016-6317 rubygem-activerecord: unsafe query generation in Active Record
CVE-2016-6317 rubygem-activerecord: unsafe query generation in Active Record
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=20160811,repor...
: Security
Depends On: 1366479 1367060 1367061
Blocks: 1365019
  Show dependency treegraph
 
Reported: 2016-08-08 07:20 EDT by Martin Prpič
Modified: 2016-09-13 07:18 EDT (History)
3 users (show)

See Also:
Fixed In Version: rubygem-activerecord 4.2.7.1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way Active Record handled certain special values in dynamic finders and relations. If a Ruby on Rails application performed JSON parameter parsing, a remote attacker could possibly manipulate search conditions in SQL queries generated by the application.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-13 07:18:58 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)
4-2-unsafe-query-generation.patch (2.79 KB, text/plain)
2016-08-08 07:21 EDT, Martin Prpič
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1855 normal SHIPPED_LIVE Moderate: rh-ror42 security update 2016-09-13 11:09:39 EDT

  None (edit)
Description Martin Prpič 2016-08-08 07:20:35 EDT
The following flaw was found in Active Record:

Due to the way Active Record interprets parameters in combination with the way that JSON parameters are parsed, it is possible for an attacker to issue unexpected database queries with "IS NULL" or empty where clauses. This issue does *not* let an attacker insert arbitrary values into an SQL query, however they can cause the query to check for NULL or eliminate a WHERE clause when most users wouldn't expect it.

This issue only affects the 4.2.x versions of Active Record.
Comment 1 Martin Prpič 2016-08-08 07:20:43 EDT
Acknowledgments:

Name: the Ruby on Rails project
Upstream: joernchen (Phenoelit)
Comment 3 Martin Prpič 2016-08-08 07:21:35 EDT
Created attachment 1188641 [details]
4-2-unsafe-query-generation.patch
Comment 4 Martin Prpič 2016-08-12 02:00:07 EDT
Created rubygem-activerecord tracking bugs for this issue:

Affects: fedora-all [bug 1366479]
Comment 5 Martin Prpič 2016-08-12 02:00:59 EDT
External References:

https://groups.google.com/forum/#!msg/rubyonrails-security/rgO20zYW33s/gmamLa-wDAAJ
Comment 6 Tomas Hoger 2016-08-12 16:08:04 EDT
Upstream commit:

4.2:
https://github.com/rails/rails/commit/93ab8c2638a5a3aa3e63915a4c646effefbae0ba
Comment 8 errata-xmlrpc 2016-09-13 07:12:27 EDT
This issue has been addressed in the following products:

  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 7.1 EUS

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

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