Bug 1334303 (CVE-2016-4558)

Summary: CVE-2016-4558 kernel: bpf: refcnt overflow
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: aquini, bhu, dhoward, fhrbata, gansalmon, iboverma, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, kstutsma, lgoncalv, madhu.chinakonda, mchehab, mcressma, nmurray, 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:
A flaw was found in the Linux kernel's implementation of BPF in which systems can application can overflow a 32 bit refcount in both program and map refcount. This refcount can wrap and end up a user after free.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 00:52: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: 1334311, 1335701    
Bug Blocks: 1334304    

Description Andrej Nemec 2016-05-09 11:12:52 UTC
A flaw was found in the Linux kernels implementation of BPF in which systems with more than 32GB of physical memory and unlimited RLIMIT_MEMLOCK settings an application can overflow a 32 bit refcount.  

Additionally in the same environment, malicious applications can overflow a map refcount on larger memory (1Tb).  When the overflow wraps to zero a reference can be held while being free'd.  This can lead to a use after free 

CVE assignment:

http://seclists.org/oss-sec/2016/q2/266

Upstream fix:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=92117d8443bc5afacc8d5ba82e541946310f106e

Comment 1 Adam Mariš 2016-05-09 11:29:03 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1334311]

Comment 3 Wade Mealing 2016-05-13 02:08:16 UTC
Statement:

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

Comment 6 Fedora Update System 2016-05-14 23:22:20 UTC
kernel-4.5.4-300.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-05-25 00:53:04 UTC
kernel-4.4.10-200.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2016-06-02 14:59:04 UTC
kernel-4.5.5-201.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.