Bug 1305803 (CVE-2016-0617)

Summary: CVE-2016-0617 kernel: hugetlbfs: fix bugs in hugetlb_vmtruncate_list()
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: agordeev, aquini, arm-mgr, bhu, dhoward, esammons, fhrbata, gansalmon, iboverma, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, kstutsma, lgoncalv, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, nmurray, pholasek, plougher, pmatouse, rt-maint, rvrbovsk, slong, vdronov, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A resource-management flaw was found in the Linux kernel's hugetlbfs handling of punching holes in hugetlbfs files with either truncate or fallocate. When truncating a hugetlbfs file, this bug could prevent some pages from being unmapped, which panics the system. With fallocate, pages could be prevented from being unmapped and then not removed, or more pages than desired could be unmapped (causing page faults to reestablish the mappings on subsequent page access). A local, non-privileged attacker could exploit this flaw by issuing a sequence of huge-page memory requests that crash the system (denial of service).
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 21:15:15 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: 1305804    
Bug Blocks: 1305808    

Description Martin Prpič 2016-02-09 09:54:09 UTC
A flaw was found in the Linux kernel's hugetlbfs handling of punching holes in hugetlbfs files with either truncate or fallocate. When truncating a hugetlbfs file, this bug could prevent some pages from being unmapped. If pages are not properly unmapped during truncate, the kernel bug is hit which leads the system to panic. In the fallocate hole punch case, this bug could prevent pages from being unmapped as in the truncate case also. However, for hole punch the result is that unmapped pages will not be removed during the operation. For hole punch, it is also possible that more pages than desired will be unmapped. This unnecessary unmapping will cause page faults to reestablish the mappings on subsequent page access.

The issue was introduced in 1bfad99ab:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1bfad99ab

And fixed in:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9aacdd354d19

Comment 1 Martin Prpič 2016-02-09 09:55:47 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1305804]

Comment 2 Martin Prpič 2016-02-09 09:56:48 UTC
This was reported on oss-sec with CVE-ID via:

http://seclists.org/oss-sec/2016/q1/295

Comment 4 Vladis Dronov 2016-02-18 21:15:15 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6, 7 and MRG-2, as the code with the flaw is not present in the products listed.

Comment 7 Fedora Update System 2016-02-28 08:19:28 UTC
kernel-4.3.6-201.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2016-02-28 12:22:14 UTC
kernel-4.4.2-301.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-03-05 01:18:33 UTC
kernel-4.4.3-201.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.