Bug 809687 (CVE-2012-2100)

Summary: CVE-2012-2100 kernel: ext4: fix inconsistency in ext4_fill_flex_info()
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: agordeev, aiyengar, anton, arozansk, bhu, dhoward, esandeen, fhrbata, jkacur, jlieskov, kernel-mgr, lgoncalv, lwang, plougher, pmatouse, rt-maint, rwheeler, sforsber, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20120110,reported=20120404,source=oss-security,cvss2=4.0/AV:L/AC:H/Au:N/C:N/I:N/A:C,rhel-4/kernel=wontfix,rhel-5/kernel=affected,rhel-6/kernel=affected,mrg-2/realtime-kernel=affected,fedora-all/kernel=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-24 09:17:18 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 809688, 809689, 809690, 809691, 809692, 809693    
Bug Blocks: 809684    

Description Eugene Teo (Security Response) 2012-04-04 00:11:07 EDT
Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by zero when trying to mount a corrupted file system") fixes CVE-2009-4307 by performing a sanity check on s_log_groups_per_flex, since it can be set to a bogus value by an attacker.

More info from Wang Xi:
The first commit (503358ae) fixes the division by zero.  The fix is not perfect because:
1) Theoretically, a standard-conforming C compiler could generate code that is still vulnerable to division by zero, but I was not aware of any compilers doing that.
2) Logically, we should have groups_per_flex = 2^s_log_groups_per_flex, and the fix doesn't really ensure that.  This is obviously not good, but not sure how bad the consequence would be.

Introduced by:
http://git.kernel.org/linus/503358ae01b70ce6909d19dd01287093f6b6271c

Upstream commit:
http://git.kernel.org/linus/d50f2ab6f050311dbf7b8f5501b25f0bf64a439b
Comment 3 Eugene Teo (Security Response) 2012-04-04 00:19:24 EDT
Created kernel tracking bugs for this issue

Affects: fedora-all [bug 809693]
Comment 4 Eugene Teo (Security Response) 2012-04-04 00:24:58 EDT
Upstream commit d50f2ab6 suffers from a buffer overflow issue, see
https://lkml.org/lkml/2012/2/20/422.
Comment 6 Vincent Danen 2012-04-12 16:25:06 EDT
This was assigned the name CVE-2012-2100:

http://www.openwall.com/lists/oss-security/2012/04/12/11
Comment 12 Vincent Danen 2012-11-01 14:21:31 EDT
Statement:

This issue did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise MRG 2.
Comment 15 errata-xmlrpc 2012-11-13 10:37:51 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2012:1445 https://rhn.redhat.com/errata/RHSA-2012-1445.html
Comment 16 errata-xmlrpc 2012-12-18 17:34:22 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:1580 https://rhn.redhat.com/errata/RHSA-2012-1580.html