Bug 1730895 (CVE-2019-13272)

Summary: CVE-2019-13272 kernel: broken permission and object lifetime handling for PTRACE_TRACEME
Product: [Other] Security Response Reporter: Laura Pardo <lpardo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: acaringi, ahardin, airlied, bhu, blc, bleanhar, brdeoliv, bskeggs, ccoleman, cperry, dblechte, dedgar, dfediuck, dhoward, dvlasenk, eedri, esammons, fhrbata, gmollett, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jgoulding, jlelli, john.j5live, jonathan, josef, jross, jshortt, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchappel, mchehab, mcressma, mgoldboi, michal.skrivanek, mjg59, mlangsdo, nmurray, pasik, plougher, rt-maint, rvrbovsk, sbonazzo, security-response-team, sherold, steved, williams, wmealing, yturgema
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 5.1.17 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way PTRACE_TRACEME functionality was handled in the Linux kernel. The kernel's implementation of ptrace can inadvertently grant elevated permissions to an attacker who can then abuse the relationship between the tracer and the process being traced. This flaw could allow a local, unprivileged user to increase their privileges on the system or cause a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-07 13:18:23 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: 1730897, 1730956, 1730957, 1730958, 1730959, 1730960, 1731005    
Bug Blocks: 1730901    

Description Laura Pardo 2019-07-17 20:06:24 UTC
A flaw in the kernels implementation of ptrace which could inadvertantly grant elevated permissions to an attacker who could abuse the relationship between tracer and the process being traced.

The mechanism used to link the process requesting the ptrace and the process being ptraced could allow a local user to obtain root level priviledges by creating an opportunity to abuse the frequently used pattern of dropping privileges and then execve a child with reduced privileges/permissions.


References:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1903
https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.1.17
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6994eefb0053799d2e07cd140df6c2ea106c41ee
https://github.com/torvalds/linux/commit/6994eefb0053799d2e07cd140df6c2ea106c41ee

Comment 1 Laura Pardo 2019-07-17 20:12:32 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1730897]

Comment 6 Wade Mealing 2019-07-18 03:51:57 UTC
This flaw is rated as Important.  The attack vector is available by default  in the affected installations and the selinux boolean to deny ptrace is not defaultly enabled

Comment 9 Petr Matousek 2019-07-18 18:04:10 UTC
Statement:

Red Hat Product Security is aware of this issue. Updates will be released as they become available. For additional information, please refer to the Red Hat Knowledgebase article:  https://access.redhat.com/articles/4292201

Comment 10 Petr Matousek 2019-07-18 18:04:14 UTC
Mitigation:

For mitigation, please refer to the Red Hat Knowledgebase article:  https://access.redhat.com/articles/4292201

Comment 13 errata-xmlrpc 2019-08-07 12:57:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2019:2405 https://access.redhat.com/errata/RHSA-2019:2405

Comment 14 Product Security DevOps Team 2019-08-07 13:18: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-13272

Comment 15 errata-xmlrpc 2019-08-07 15:18:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2019:2411 https://access.redhat.com/errata/RHSA-2019:2411

Comment 17 Sam Fowler 2019-08-16 01:40:37 UTC
This issue has been addressed in the following products:

  OpenShift Container Platform 4

Via RHBA-2019:2417 https://access.redhat.com/errata/RHBA-2019:2417

Comment 22 errata-xmlrpc 2019-09-20 11:54:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2809 https://access.redhat.com/errata/RHSA-2019:2809

Comment 23 Sam Fowler 2020-05-18 06:38:03 UTC
OpenShift Container Platform 4 does not ship its own kernel package, instead using versions shipped in RHEL. Removing from flaw bug affects.