Bug 1568477 (CVE-2018-1000199) - CVE-2018-1000199 kernel: ptrace() incorrect error handling leads to corruption and DoS
Summary: CVE-2018-1000199 kernel: ptrace() incorrect error handling leads to corruptio...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-1000199
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1569874 1569875 1569876 1569877 1569878 1569879 1569897 1569935 1569936 1569937 1569938 1569939 1569940 1571203 1573536
Blocks: 1568479
TreeView+ depends on / blocked
 
Reported: 2018-04-17 15:13 UTC by Pedro Sampaio
Modified: 2021-06-10 15:51 UTC (History)
56 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An address corruption flaw was discovered in the Linux kernel built with hardware breakpoint (CONFIG_HAVE_HW_BREAKPOINT) support. While modifying a h/w breakpoint via 'modify_user_hw_breakpoint' routine, an unprivileged user/process could use this flaw to crash the system kernel resulting in DoS OR to potentially escalate privileges on a the system.
Clone Of:
Environment:
Last Closed: 2018-05-28 14:11:04 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1318 0 None None None 2018-05-08 18:26:11 UTC
Red Hat Product Errata RHSA-2018:1345 0 None None None 2018-05-08 19:49:21 UTC
Red Hat Product Errata RHSA-2018:1347 0 None None None 2018-05-08 21:38:18 UTC
Red Hat Product Errata RHSA-2018:1348 0 None None None 2018-05-08 21:54:14 UTC
Red Hat Product Errata RHSA-2018:1354 0 None None None 2018-05-08 22:26:23 UTC
Red Hat Product Errata RHSA-2018:1355 0 None None None 2018-05-08 22:25:15 UTC
Red Hat Product Errata RHSA-2018:1374 0 None None None 2018-05-14 13:09:01 UTC

Description Pedro Sampaio 2018-04-17 15:13:55 UTC
Linux kernel built with the hardware breakpoint(CONFIG_HAVE_HW_BREAKPOINT) support is vulnerable to a breakpoint address corruption issue. It could occur while modifying a h/w breakpoint via 'modify_user_hw_breakpoint' routine.

An unprivileged user/process could use this flaw to crash the system kernel resulting in DoS OR to potentially escalate privileges on a the system.

Upstream patches:
-----------------
  -> https://git.kernel.org/linus/f67b15037a7a50c57f72e69a6d59941ad90a0f0f
  -> https://git.kernel.org/linus/18ff57b220610a699947f20b156a8245ca7eee98
  -> https://git.kernel.org/linus/705feaf321c37e4dca3637fd5cb3b275f17a06c9

Reference:
----------
  -> http://www.openwall.com/lists/oss-security/2018/05/01/3

Comment 1 Adam Mariš 2018-04-18 07:37:08 UTC
Acknowledgments:

Name: Andy Lutomirski

Comment 7 Prasad Pandit 2018-04-30 20:47:34 UTC
Mitigation:

To mitigate this issue:
1) Save the following script in a 'CVE-2018-1000199.stp' file.
---
probe kernel.function("ptrace_set_debugreg") {
        if ($n < 4)
            $n = 4; /* set invalid debug register #, returns -EIO */
}
probe begin {
        printk(0, "CVE-2018-1000199 mitigation loaded")
}
probe end {
        printk(0, "CVE-2018-1000199 mitigation unloaded")
}
---
2)  Install systemtap package and its dependencies
     # yum install -y systemtap systemtap-runtime
     # yum install -y kernel-devel kernel-debuginfo  kernel-debuginfo-common

3) Build the mitigation kernel module as root.
    # stap -r `uname -r` -m cve_2018_1000199.ko -g CVE-2018-1000199.stp -p4

4) Load the mitigation module as root
    # staprun -L cve_2018_1000199.ko

Comment 9 Eric Christensen 2018-05-01 19:53:43 UTC
Statement:

This issue does not affect the versions of Linux kernel as shipped with Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6.

This issue affects the version of the kernel package as shipped with Red Hat Enterprise Linux 7 and Red Hat Enterprise MRG 2. Future kernel updates for Red Hat Enterprise Linux 7 and Red Hat Enterprise MRG 2 may address this issue.

Comment 11 errata-xmlrpc 2018-05-08 18:25:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1318 https://access.redhat.com/errata/RHSA-2018:1318

Comment 12 errata-xmlrpc 2018-05-08 19:49:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Extended Update Support

Via RHSA-2018:1345 https://access.redhat.com/errata/RHSA-2018:1345

Comment 13 errata-xmlrpc 2018-05-08 21:37:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Advanced Update Support
  Red Hat Enterprise Linux 7.2 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.2 Telco Extended Update Support

Via RHSA-2018:1347 https://access.redhat.com/errata/RHSA-2018:1347

Comment 14 errata-xmlrpc 2018-05-08 21:53:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.3 Extended Update Support

Via RHSA-2018:1348 https://access.redhat.com/errata/RHSA-2018:1348

Comment 15 errata-xmlrpc 2018-05-08 22:24:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1355 https://access.redhat.com/errata/RHSA-2018:1355

Comment 16 errata-xmlrpc 2018-05-08 22:26:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2018:1354 https://access.redhat.com/errata/RHSA-2018:1354

Comment 17 errata-xmlrpc 2018-05-14 13:08:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1374 https://access.redhat.com/errata/RHSA-2018:1374

Comment 18 Gadget 2018-06-07 01:20:58 UTC
How can you validate that the patch made it on? I see the script and the articles, but can you validate with a version of the kernel?  if I run uname -r and it comes back with 

3.10.0-862.2.3.e17.x86_64

does that mean the system is not vulnerable anymore?

Comment 19 Prasad Pandit 2018-06-07 10:04:48 UTC
(In reply to Gadget from comment #18)
> if I run uname -r and it comes back with 
> 
> 3.10.0-862.2.3.e17.x86_64
> does that mean the system is not vulnerable anymore?

Yes, it does include the fix. Please note, Bugzilla is not for support queries. 
Please use proper support channel for future questions:

  -> https://access.redhat.com/ 

Thank you.


Note You need to log in before you can comment on or make changes to this bug.