Bug 1784942 (CVE-2019-19241)

Summary: CVE-2019-19241 kernel: privilege escalation via io_uring offload of sendmsg() onto kernel thread with kernel creds
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, bdettelb, bhu, blc, brdeoliv, bskeggs, dhoward, dvlasenk, esammons, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jlelli, john.j5live, jonathan, josef, jross, jschorr, jshortt, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, masami256, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, qzhao, rt-maint, rvrbovsk, steved, williams
Target Milestone: ---Keywords: Reopened, Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-07 13:17: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: 1784945, 1876428, 1876429    
Bug Blocks: 1784943    

Description Guilherme de Almeida Suckevicz 2019-12-18 18:58:20 UTC
In the Linux kernel before 5.4.2, the io_uring feature leads to requests that inadvertently have UID 0 and full capabilities. This is related to fs/io-wq.c, fs/io_uring.c, and net/socket.c. For example, an attacker can bypass intended restrictions on adding an IPv4 address to the loopback interface. This occurs because IORING_OP_SENDMSG operations, although requested in the context of an unprivileged user, are sometimes performed by a kernel worker thread without considering that context.

Reference:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1975

Upstream commits:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=181e448d8709e517c9c7b523fcd209f24eb38ca7
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d69e07793f891524c6bbf1e75b9ae69db4450953

Comment 1 Guilherme de Almeida Suckevicz 2019-12-18 18:59:31 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1784945]

Comment 2 Justin M. Forbes 2019-12-19 15:24:10 UTC
This is fixed for Fedora with the 5.3.15 stable kernel updates.

Comment 3 Wade Mealing 2020-02-06 02:44:28 UTC
Statement:

At this time, no Red Hat Enterprise Linux products ship with support for this feature.  There is an outstanding feature request for io_uring to be included with Red Hat Enterprise Linux 8.

Comment 4 Wade Mealing 2020-02-06 02:46:28 UTC
Feature request here: 

https://bugzilla.redhat.com/show_bug.cgi?id=1706143

Engineering has been made aware of the patches required to fix the CVE in that feature request and product security's request to have these patches included pre-release.

Comment 5 Product Security DevOps Team 2020-06-04 17:20:23 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-2019-19241

Comment 7 Product Security DevOps Team 2020-09-07 13:17:46 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-2019-19241