Bug 1923636 (CVE-2021-20239)

Summary: CVE-2021-20239 kernel: setsockopt System Call Untrusted Pointer Dereference Information Disclosure
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact: Zhiqian Guan <zhguan>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, asavkov, bhu, blc, bmasney, brdeoliv, bskeggs, chwhite, dhoward, dramseur, dvlasenk, eshatokhin, fhrbata, hdegoede, hkrzesin, itamar, jarodwilson, jeremy, jforbes, jhunter, jlelli, joe.lawrence, jonathan, josef, jpoimboe, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, kmitts, kpatch-maint, lgoncalv, linville, masami256, mchehab, mgala, mlangsdo, nmurray, ptalbert, qzhao, rhandlin, rvrbovsk, steved, walters, williams, wmealing, ycote, zhguan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.4.92 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the BPF protocol. This flaw allows an attacker with a local account to leak information about kernel internal addresses. The highest threat from this vulnerability is to confidentiality.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-08 01:29:46 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: 1933655, 1923640, 1929475, 1929476    
Bug Blocks: 1923644    

Description Pedro Sampaio 2021-02-01 17:21:42 UTC
A flaw was found in the Linux kernels implementation of BPF. A local user with CAP_NET_ADMIN can attach an ebpf filter to setsockopt() syscall.   This filter can be triggered under the right conditions to leak kernel internal information.  This could allow an attacker to determine the layout of information in kernel memory to be used in future attacks.

This flaw  is also known as ZDI-21-100.

References:

https://www.zerodayinitiative.com/advisories/ZDI-21-100/
https://gist.github.com/Ga-ryo/2ec958e78f55c5d18558960f3fe1c6ec

Comment 1 Pedro Sampaio 2021-02-01 17:22:31 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1923640]

Comment 2 Justin M. Forbes 2021-02-02 16:00:03 UTC
This was fixed for Fedora with the 5.10.10 stable kernel updates.

Comment 4 Wade Mealing 2021-02-12 07:05:12 UTC
This flaw is rated as low, it is an information leak which may 'aid' an attacker to privesc, but not privesc itself

Comment 10 Wade Mealing 2021-02-17 02:13:06 UTC
Mitigation:

Loading a filter is a privileged (CAP_SYS_ADMIN or root) operation. Once any filter is used, this attack is capable of being used by an unprivileged user.  There is no known mitigation that product security finds suitable for this flaw.

Comment 29 errata-xmlrpc 2021-11-09 17:21:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 30 errata-xmlrpc 2021-11-09 18:23:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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