Bug 1400019 (CVE-2016-8655)

Summary: CVE-2016-8655 kernel: Race condition in packet_set_ring leads to use after free
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agordeev, aquini, bhu, chref, dafox7777777, dhoward, ealcaniz, esammons, fhrbata, hannsj_uhl, iboverma, jhan, jkacur, joelsmith, jross, kabbott, kernel-mgr, lgoncalv, lwang, martin, matt, mcressma, menthos, mguzik, mjc, nmurray, pasteur, pholasek, plougher, pmatouse, rvrbovsk, sander.van.dinten, sardella, security-response-team, slawomir, williams, 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 race condition issue leading to a use-after-free flaw was found in the way the raw packet sockets implementation in the Linux kernel networking subsystem handled synchronization while creating the TPACKET_V3 ring buffer. A local user able to open a raw packet socket (requires the CAP_NET_RAW capability) could use this flaw to elevate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-05 05:04:33 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: 1401820, 1401852, 1401853, 1401854, 1401855, 1401856, 1401857    
Bug Blocks: 1400022    

Description Adam Mariš 2016-11-30 10:02:22 UTC
A race condition vulnerability was found in packet_set_ring that can lead to use after free on a function pointer. This vulnerability can be used to gain kernel code execution for the local attacker capable of creating AF_PACKET sockets. This issue was introduced with following commit:

https://github.com/torvalds/linux/commit/f6fb8f100b807378fda19e83e5ac6828b638603a

Comment 1 Adam Mariš 2016-11-30 10:02:36 UTC
Acknowledgments:

Name: Philip Pettersson

Comment 4 Andrej Nemec 2016-12-06 08:10:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1401820]

Comment 5 Andrej Nemec 2016-12-06 08:11:21 UTC
Public via:

http://seclists.org/oss-sec/2016/q4/607

Comment 7 Petr Matousek 2016-12-06 09:15:16 UTC
Statement:

This issue does not affect Red Hat Enterprise Linux 5 and 6.

This issue does affect Red Hat Enterprise Linux 7 and Red Hat Enterprise MRG 2. Future updates for the respective releases will address this issue.

In a default or common use of Red Hat Enterprise Linux 7 this issue does not allow an unprivileged local user elevate their privileges on the system.

In order to exploit this issue the attacker needs CAP_NET_RAW capability, which needs to be granted by the administrator to the attacker's account. Since Red Hat Enterprise Linux 7 does not have unprivileged user namespaces enabled by default, local unprivileged users also cannot abuse namespaces to grant this capability to themselves and elevate their privileges.

Comment 22 dafox7777777 2017-01-24 08:52:34 UTC
bump

Comment 23 errata-xmlrpc 2017-03-02 16:04:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

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

Comment 24 errata-xmlrpc 2017-03-02 17:16:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 25 errata-xmlrpc 2017-03-02 17:25:01 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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