Bug 1868453 (CVE-2020-14356)

Summary: CVE-2020-14356 kernel: Use After Free vulnerability in cgroup BPF component
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, bhu, blc, bmasney, brdeoliv, bskeggs, cscribne, dbaker, dhoward, dvlasenk, esammons, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jlelli, john.j5live, jonathan, josef, jross, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, masami256, mchehab, mcressma, mjg59, mlangsdo, nmurray, ptalbert, qzhao, rt-maint, rvrbovsk, steved, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.7.10 Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in the Linux kernel’s cgroupv2 subsystem when rebooting the system. This flaw allows a local user to crash the system or escalate their privileges. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 20:34:32 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: 1872015, 1872016, 1872017, 1868479, 1868659, 1868660    
Bug Blocks: 1859200    

Description Alex 2020-08-12 18:10:33 UTC
It was found that the Linux kernel's use after free issue could happen during the usage of cgroupv2 (usually when reboot and more likely if virtual machine or docker being used).
After recent commit 090e28b ("netprio_cgroup: Fix unlimited memory leak of v2 cgroups") was merged, the problem could be reproduced much simpler starting with 5.7.x kernels.
The problem introduced with 4.5 kernel, but there is no known way to trigger it, so it was not known until 5.7 kernel.
It could be possible to reproduce the bug by the user without privileges and without reboot if user has an ability to create/close cgroupv2 or this user create a process which is attached to already existing cgroupv2 BPF (but still the user will have to wait till root manually closes cgroupv2 or system is being rebooted).

This commit fixes the problem:
https://github.com/torvalds/linux/commit/94886c86e833dbc8995202b6c6aaff592b7abd24

Comment 1 Alex 2020-08-12 18:10:38 UTC
Acknowledgments:

Name: Adam Zabrocki (pi3.com.pl)

Comment 4 Alex 2020-08-12 19:43:34 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1868479]

Comment 5 Justin M. Forbes 2020-08-12 20:44:26 UTC
This was fixed for Fedora in the 5.7.10 stable kernel updates.

Comment 11 Petr Matousek 2020-08-26 12:05:52 UTC
Statement:

This flaw is rated as a having Moderate impact, because only local user can trigger it and no way to trigger it before reboot happens (until user have complete privileges for accessing cgroupv2).

Comment 18 errata-xmlrpc 2021-05-18 13:20:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1578 https://access.redhat.com/errata/RHSA-2021:1578

Comment 19 errata-xmlrpc 2021-05-18 14:40:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1739 https://access.redhat.com/errata/RHSA-2021:1739

Comment 20 Product Security DevOps Team 2021-05-18 20:34:32 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-14356