kernel: use after free bug in "quota" handling

Bug #987107 reported by Shachar Raindel
This bug report is a duplicate of:  Bug #990368: CVE-2012-2133. Edit Remove
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Confirmed
High
linux (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

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.

See report in RedHat's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=815065

CVE References

Changed in linux:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for the report, Shachar. I've removed the reproducer in preparation of making this bug public. This Ubuntu Security Team has retained a copy.

We are aware of the issue and its progress can be tracked here:

http://people.canonical.com/~ubuntu-security/cve/2012/CVE-2012-2133.html

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

We have a tracking bug for this already in bug #990368, so I am going to mark this as a duplicate. Thanks for the report.

visibility: private → public
Changed in linux (Ubuntu):
status: New → Triaged
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.