CVE-2019-13272: Linux Kernel Improper Privilege Management Vulnerability
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
Other sources
A flaw was found in the way PTRACETRACEME 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.
In the Linux kernel before 5.1.17, ptracelink in kernel/ptrace.c mishandles the recording of the credentials of a process that wants to create a ptrace relationship, which allows local users to obtain root access by leveraging certain scenarios with a parent-child process relationship, where a parent drops privileges and calls execve (potentially allowing control by an attacker). One contributing factor is an object lifetime issue (which can also cause a panic). Another contributing factor is incorrect marking of a ptrace relationship as privileged, which is exploitable through (for example) Polkit's pkexec helper with PTRACETRACEME. NOTE: SELinux denyptrace might be a usable workaround in some environments.
Kernel/ptrace.c in Linux kernel mishandles contains an improper privilege management vulnerability that allows local users to obtain root access.
— CISA
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernel-altto a version that resolves this vulnerability.Fixed in 0:4.14.0-115.12.1.el7a - Upgrade
Upgrade
redhat/kernel-rtto a version that resolves this vulnerability.Fixed in 0:4.18.0-80.7.2.rt9.154.el8_0 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 0:4.18.0-80.7.2.el8_0 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.1.17 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.262-1Fixed in 6.1.176-1Fixed in 6.1.180-1Fixed in 6.12.94-1Fixed in 6.12.101-1Fixed in 7.1.7-1Fixed in 7.1.8-1 - Upgrade
Upgrade
linux/kernelto a version that resolves this vulnerability.Fixed in 5.1.17 - Configuration
If applicable in your environment, enable/ensure SELinux deny_ptrace is in effect as a workaround.
SELinux deny_ptrace = enabled - Compensating control
Follow the Red Hat Knowledgebase article referenced in the material (Red Hat KB 4292201) for mitigation guidance for this ptrace privilege management flaw.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2019-13272?
CVE-2019-13272 is classified with medium severity due to its potential to grant elevated permissions to attackers.
How do I fix CVE-2019-13272?
To mitigate CVE-2019-13272, it is recommended to update the kernel to versions 5.1.17 or later, or the specific versions 0:4.14.0-115.12.1.el7a and 0:4.18.0-80.7.2.el8_0.
Which systems are affected by CVE-2019-13272?
CVE-2019-13272 affects various Linux kernel versions including RHEL, Ubuntu, Debian, and Fedora releases as detailed in the vulnerability report.
What is the exploit vector for CVE-2019-13272?
The exploit vector for CVE-2019-13272 involves a flaw in the ptrace implementation that can be abused by a malicious process observing another process.
Is there an official patch for CVE-2019-13272?
Yes, official patches addressing CVE-2019-13272 have been released and are included in the latest kernel updates.