Bug 1335889 (CVE-2016-4794)

Summary: CVE-2016-4794 kernel: Use after free in array_map_alloc
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: aquini, arm-mgr, bhu, carnil, dhoward, fhrbata, gansalmon, iboverma, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, kstutsma, lgoncalv, madhu.chinakonda, matt, mchehab, mcressma, nmurray, plougher, pmatouse, rt-maint, rvrbovsk, slawomir, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Use after free vulnerability was found in percpu using previously allocated memory in bpf. First __alloc_percpu_gfp() is called, then the memory is freed with free_percpu() which triggers async pcpu_balance_work and then pcpu_extend_area_map could use a chunk after it has been freed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:51:50 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: 1335890, 1344568, 1344569, 1344570, 1344571, 1344572, 1344573, 1344574, 1344575    
Bug Blocks: 1336283    

Description Adam Mariš 2016-05-13 13:27:43 UTC
Use after free vulnerability was found in percpu using previously allocated memory in bpf. First __alloc_percpu_gfp() is called, then the memory is freed with free_percpu() which triggers async pcpu_balance_work and then pcpu_extend_area_map is hitting use-after-free.

CVE request (contains reproducer):
http://seclists.org/oss-sec/2016/q2/332

1: percpu: fix synchronization between chunk->map_extend_work and chunk destruction
( https://www.mail-archive.com/netdev@vger.kernel.org/msg111820.html )

2: percpu: fix synchronization between synchronous map extension and chunk destruction
( https://www.mail-archive.com/netdev@vger.kernel.org/msg111747.html )

Comment 1 Adam Mariš 2016-05-13 13:28:34 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1335890]

Comment 8 Wade Mealing 2016-06-10 05:33:02 UTC
Statement:

This issue does not affect the Linux kernels as shipped with Red Hat Enterprise Linux 4, 5 and 6.

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

Comment 12 errata-xmlrpc 2016-11-03 16:33:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 13 errata-xmlrpc 2016-11-03 19:51:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 14 errata-xmlrpc 2016-11-03 21:35:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 15 errata-xmlrpc 2016-11-03 21:50:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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