Bug 1518632 (CVE-2017-17052)

Summary: CVE-2017-17052 kernel: use-after-free in kernel/fork.c:mm_init function
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: airlied, ajax, aquini, bhu, blc, bskeggs, dhoward, ewk, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jkacur, john.j5live, jonathan, josef, jross, jwboyer, kernel-maint, kernel-mgr, lgoncalv, linville, mchehab, mcressma, mjg59, mlangsdo, nmurray, rt-maint, rvrbovsk, steved, vdronov, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.13 Doc Type: Bug Fix
Doc Text:
The mm_init function in kernel/fork.c in the Linux kernel before 4.12.10 does not clear the ->exe_file member of a new process's mm_struct, allowing a local attacker to achieve a use-after-free condition and to induce a kernel memory corruption on the system, leading to a crash or possibly have unspecified other impact by running a specially crafted program. Due to the nature of the flaw, privilege escalation cannot be fully ruled out, although we feel it is unlikely.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 10:53:54 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: 1518642, 1532375    
Bug Blocks: 1518641    

Description Adam Mariš 2017-11-29 11:24:25 UTC
The mm_init function in kernel/fork.c in the Linux kernel before 4.12.10 does not clear the ->exe_file member of a new process's mm_struct, allowing a local attacker to achieve a use-after-free condition and to induce a kernel memory corruption on the system, leading to a crash or possibly have unspecified other impact by running a specially crafted program. Due to the nature of the flaw, privilege escalation cannot be fully ruled out, although we believe it is unlikely.

References:

https://marc.info/?t=150352307300011&r=1&w=2

https://marc.info/?l=linux-mm&m=150352295801128&w=2

https://marc.info/?t=150406422700001&r=1&w=2

https://marc.info/?l=linux-mm&m=150406409727095&w=2

Upstream patches:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b7e8665b4ff51c034c55df3cff76518d1a9ee3a

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=355627f518978b5167256d27492fe0b343aaf2f2

Comment 1 Adam Mariš 2017-11-29 11:44:51 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1518642]

Comment 2 Justin M. Forbes 2017-11-29 17:12:34 UTC
Fedora hasn't supported a 4.12.x kernel in quite some time. Current kernels are 4.13.16 across all supported releases.

Comment 6 Vladis Dronov 2018-01-08 19:52:05 UTC
Notice:

What is Red Hat Enterprise Linux 7 for ARM 64,
        Red Hat Enterprise Linux 7 for Power 9 LE

The kernel package as shipped with Red Hat Enterprise Linux 7 for ARM 64 and Red Hat Enterprise Linux 7 for Power 9 LE is an updated kernel intended to support new architectures not available at the time of Red Hat Enterprise Linux 7 original shipping. The new kernel version is based on an upstream Linux kernel version 4.11. The offering is distributed with other updated packages, but most of the userspace is the standard Red Hat Enterprise Linux 7 Server RPM files.

For more information please refer to:

https://access.redhat.com/articles/3158541
https://access.redhat.com/articles/3158511

Comment 8 Eric Christensen 2018-01-10 15:43:21 UTC
Statement:

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

This issue affects the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 7 for ARM 64 and Red Hat Enterprise Linux 7 for Power 9 LE. Future updates for the respective releases may address this issue.