Bug 824345 (CVE-2012-2390)

Summary: CVE-2012-2390 kernel: huge pages: memory leak on mmap failure
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anton, arozansk, bhu, dhoward, fhrbata, jackkim, jkacur, kernel-mgr, lgoncalv, lwang, mmilgram, mrg-program-list, security-response-team, sforsber, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-24 12:45:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 824350, 824351, 824352, 824353, 824354    
Bug Blocks: 824358    

Description Petr Matousek 2012-05-23 10:18:19 UTC
Description of problem:
When called for anonymous (non-shared) mappings, hugetlb_reserve_pages() does a resv_map_alloc().  It depends on code in hugetlbfs's vm_ops->close() to release that allocation.

However, in the mmap() failure path, we do a plain unmap_region() without the remove_vma() which actually calls vm_ops->close(). 

An unprivileged local user could use this flaw to crash the system.

References:
http://www.spinics.net/lists/linux-mm/msg34763.html

Proposed upstream fix:
https://lkml.org/lkml/2012/5/21/385

Comment 3 Petr Matousek 2012-05-23 10:24:08 UTC
Created kernel tracking bugs for this issue

Affects: fedora-all [bug 824352]

Comment 4 Kurt Seifried 2012-05-23 18:05:10 UTC
Added CVE as per http://www.openwall.com/lists/oss-security/2012/05/23/14

Comment 5 Petr Matousek 2012-05-30 11:01:45 UTC
Upstream commits:
 c50ac050811d6485616a193eb0f37bfbd191cc89
 4523e1458566a0e8ecfaff90f380dd23acc44d27

Comment 9 Fedora Update System 2012-06-07 02:33:21 UTC
kernel-3.4.0-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2012-06-13 21:30:08 UTC
kernel-3.3.8-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2012-06-22 08:37:59 UTC
kernel-2.6.43.8-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Petr Matousek 2012-07-04 05:30:12 UTC
Statement:

This issue did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 5 as they did not include the upstream commit 84afd99b that introduced this issue. Future kernel updates for Red Hat Enterprise Linux 6 may address this issue.

This has been addressed in Red Hat Enterprise Linux Red Hat Enterprise MRG 2 via https://rhn.redhat.com/errata/RHSA-2012-1150.html

Comment 13 errata-xmlrpc 2012-08-08 16:35:17 UTC
This issue has been addressed in following products:

  MRG for RHEL-6 v.2

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

Comment 14 errata-xmlrpc 2012-09-25 18:59:58 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

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