Bug 815065 - CVE-2012-2133 kernel: use after free bug in "quota" handling
CVE-2012-2133 kernel: use after free bug in "quota" handling
Status: CLOSED DUPLICATE of bug 817430
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On:
Blocks: 815174
  Show dependency treegraph
Reported: 2012-04-22 06:11 EDT by Shachar Raindel
Modified: 2012-06-04 10:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-29 21:08:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Shachar Raindel 2012-04-22 06:11:53 EDT
Created attachment 579274 [details]
Example code - will crash a machine running a debug kernel

Description of problem:

There is a use after free bug in the kernel hugetlb code. The bug can allow an authenticated, unprivileged local attacker to crash the system (and possibly gain higher privileges) if huge pages are enabled in the system.

A fix has been committed to upstream, commit 90481622d75715bfcb68501280a917dbfe516029 "hugepages: fix use after free bug in "quota" handling"

Version-Release number of selected component (if applicable):
The bug exists in kernel versions 2.6.24 and above.

How reproducible:

The attached tarball includes an example code which utilizes a fuse mount with O_DIRECT flag to reproduce the issue. The code will work only on kernels 2.6.32 and above since it uses the new "anonymous mapping" API for getting huge pages. Similar reproduction is possible when using the shmem API or the hugetlbfs API. 
Stock kernel might not crash, debug kernel will detect the corruption and kill the process.

Steps to Reproduce:
1. Untar the attached file
2. Run run_test.sh. The fuse-devel package and sudo rights are required for the fuse mount. Sudo rights are also required for enabling huge pages.
3. Observe the kernel crash when running debug kernel. Normal kernels will (usually) not crash, as the slab allocator will not return the memory blocks to the system general pool for a while.
Actual results:

A general protection fault message is printed, and the server is frozen.

Expected results:

The process should exit without the kernel crashing.

Additional info:

Verified on RHEL 6.0 with Dell PowerEdge 2950, should exist also on RHEL 6.2 and 6.1.
Comment 3 Kurt Seifried 2012-04-24 11:23:56 EDT
Added CVE as per http://www.openwall.com/lists/oss-security/2012/04/24/12
Comment 4 Doug Ledford 2012-04-24 12:37:29 EDT
I'm not sure why myself and Mellanox were added to this bug, but it is totally unrelated to code we take care of.  Removing us from the Cc: list.
Comment 5 Eugene Teo (Security Response) 2012-04-29 21:08:50 EDT

*** This bug has been marked as a duplicate of bug 817430 ***

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