Bug 1889477 (CVE-2020-27194)

Summary: CVE-2020-27194 kernel: bounds tracking issue during use of 64-bit values in scalar32_min_max_or function in kernel/bpf/verifier.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, bhu, blc, bmasney, brdeoliv, bskeggs, 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, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds access flaw was found in the Linux kernel’s implementation of the eBPF (Berkeley Packet Filter) code verifier, where an incorrect register bounds calculation occurs while in use of 64-bit values with scalar32_min_max_or (that is BPF_OR). This flaw allows an unprivileged local user (until param kernel.unprivileged_bpf_disabled is set) to have arbitrary read/write access to the kernel memory or escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-05 08:21:16 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: 1889479, 1894219, 1894220, 1894221, 1894222, 1894224    
Bug Blocks: 1889480    

Description Guilherme de Almeida Suckevicz 2020-10-19 18:14:53 UTC
An issue was discovered in the Linux kernel before 5.8.15. scalar32_min_max_or in kernel/bpf/verifier.c mishandles bounds tracking during use of 64-bit values.

Reference and upstream patch:
https://github.com/torvalds/linux/commit/5b9fbeb75b6a98955f628e205ac26689bcb1383e

Comment 1 Guilherme de Almeida Suckevicz 2020-10-19 18:16:08 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1889479]

Comment 3 Justin M. Forbes 2020-10-20 12:23:28 UTC
This was fixed for Fedora with the 5.8.15 stable kernel updates.

Comment 14 Product Security DevOps Team 2020-11-05 08:21:16 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-27194

Comment 16 RaTasha Tillery-Smith 2020-11-11 17:04:56 UTC
Statement:

This flaw is rated as having a Moderate impact because in the default configuration, the issue can only be triggered by a privileged local user.

Comment 17 RaTasha Tillery-Smith 2020-11-11 17:04:57 UTC
Mitigation:

For Red Hat Enterprise Linux, the Berkeley Packet Filter is available only for privileged users. However, if enabled for an unprivileged user, the mitigation is to disable unprivileged access to the BPF using the following sysctl: kernel.unprivileged_bpf_disabled=1.