Bug 1382268 (CVE-2016-7117)

Summary: CVE-2016-7117 kernel: Use-after-free in the recvmmsg exit path
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agordeev, alekcejk, amaris, aquini, arm-mgr, bhaubeck, bhu, chorn, dhoward, esammons, fhrbata, frederik.ferner, gansalmon, greg.matthews, harshula, hkim, hmatsumo, iboverma, ichavero, itamar, jforbes, jkacur, jmaxwell, joelsmith, jonathan, jross, jwboyer, kent, kernel-maint, kernel-mgr, labbott, lgoncalv, lmoroncelli, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, nmurray, pholasek, plougher, pmatouse, redhat-e27, rt-maint, rvrbovsk, slawomir, surkumar, tommi.tervo, vdronov, williams, wmealing, xmu, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A use-after-free vulnerability was found in the kernel's socket recvmmsg subsystem. This may allow remote attackers to corrupt memory and may allow execution of arbitrary code. This corruption takes place during the error handling routines within __sys_recvmmsg() function.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 10:58:17 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: 1382269, 1390044, 1390046, 1390047, 1390048, 1390805, 1390806, 1390807, 1390808, 1399113, 1399114, 1399115, 1399116, 1399117, 1399118, 1399119    
Bug Blocks: 1382270    

Description Andrej Nemec 2016-10-06 07:54:18 UTC
A use after free vulnerability was found in the kernels socket recvmsg subsystem.   This may allows remote attackers to corrupt memory and may allow execution of arbitrary code.  This corruption takes place during the error handling routines within __sys_recvmmsg() function.

To attack the kernel using this method the system must be running application using the UDP recvmmsg syscall().

Upstream patch:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34b88a68f26a75e4fded796f1a49c40f82234b7d

Upstream discussion:
https://patchwork.kernel.org/patch/8093221/

Additional Write up:
https://blog.lizzie.io/notes-about-cve-2016-7117.html

Comment 1 Andrej Nemec 2016-10-06 07:55:16 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1382269]

Comment 3 Wade Mealing 2016-10-27 01:49:41 UTC
Statement:

This issue affects the Linux kernels as shipped with Red Hat Enterprise Linux 5, 6, 7, MRG-2 and realtime and may be addressed in a future update.

Comment 23 errata-xmlrpc 2016-12-20 11:45:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

Via RHSA-2016:2962 https://rhn.redhat.com/errata/RHSA-2016-2962.html

Comment 25 errata-xmlrpc 2017-01-10 17:06:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.7 Extended Update Support

Via RHSA-2017:0031 https://rhn.redhat.com/errata/RHSA-2017-0031.html

Comment 26 errata-xmlrpc 2017-01-10 17:09:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2017:0036 https://rhn.redhat.com/errata/RHSA-2017-0036.html

Comment 28 errata-xmlrpc 2017-01-17 07:53:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.5 Advanced Update Support
  Red Hat Enterprise Linux 6.5 Telco Extended Update Support

Via RHSA-2017:0065 https://rhn.redhat.com/errata/RHSA-2017-0065.html

Comment 29 errata-xmlrpc 2017-01-17 18:01:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2017:0113 https://rhn.redhat.com/errata/RHSA-2017-0113.html

Comment 30 errata-xmlrpc 2017-01-17 18:19:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:0086 https://rhn.redhat.com/errata/RHSA-2017-0086.html

Comment 31 errata-xmlrpc 2017-01-17 18:24:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:0091 https://rhn.redhat.com/errata/RHSA-2017-0091.html

Comment 33 errata-xmlrpc 2017-01-26 10:28:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.4 Advanced Update Support

Via RHSA-2017:0196 https://rhn.redhat.com/errata/RHSA-2017-0196.html

Comment 34 errata-xmlrpc 2017-01-31 12:59:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.2 Advanced Update Support

Via RHSA-2017:0215 https://rhn.redhat.com/errata/RHSA-2017-0215.html

Comment 35 errata-xmlrpc 2017-01-31 13:13:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Extended Update Support

Via RHSA-2017:0217 https://rhn.redhat.com/errata/RHSA-2017-0217.html

Comment 36 errata-xmlrpc 2017-01-31 13:17:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6.6 Advanced Update Support
  Red Hat Enterprise Linux 6.6 Telco Extended Update Support

Via RHSA-2017:0216 https://rhn.redhat.com/errata/RHSA-2017-0216.html

Comment 37 errata-xmlrpc 2017-02-15 03:11:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.1 Extended Update Support

Via RHSA-2017:0270 https://rhn.redhat.com/errata/RHSA-2017-0270.html

Comment 38 Martin Prpič 2017-02-15 10:48:46 UTC
To exploit this issue, the attacker must be able to leverage a specific setup of the application/socket that is being targeted. In addition, specific timing behavior must be met for the affected code to be in a state where it can be exploited, making the exploitation of this flaw under normal conditions fairly difficult.

In detail, the targeted socket on the remote end must be closed/terminated, which may trigger the error (use-after-free), which then allows for the exploitation to happen.

Comment 43 Adam Mariš 2017-09-07 08:53:22 UTC
*** Bug 1489092 has been marked as a duplicate of this bug. ***