Bug 1568744 (CVE-2018-1000200) - CVE-2018-1000200 kernel: NULL pointer dereference on OOM kill of large mlocked process
Summary: CVE-2018-1000200 kernel: NULL pointer dereference on OOM kill of large mlocke...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-1000200
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1570542 1571595 1571596
Blocks: 1568749
TreeView+ depends on / blocked
 
Reported: 2018-04-18 08:29 UTC by Adam Mariš
Modified: 2021-02-17 00:29 UTC (History)
43 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel where an out of memory (oom) killing of a process that has large spans of mlocked memory can result in deferencing a NULL pointer, leading to denial of service.
Clone Of:
Environment:
Last Closed: 2019-06-10 10:20:05 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2948 0 None None None 2018-10-30 09:00:27 UTC

Description Adam Mariš 2018-04-18 08:29:27 UTC
It was found that out of memory (oom) killing a process that has large spans of mlocked memory can result in deferencing a NULL pointer, leading to denial of service.

The issue arises from an oom killed process's final thread calling exit_mmap(), which calls munlock_vma_pages_all() for mlocked vmas.  This can happen synchronously with the oom reaper's unmap_page_range() since the vma's VM_LOCKED bit is cleared before munlocking (to determine if any other vmas share the memory and are mlocked).

References: 

https://marc.info/?l=linux-kernel&m=152400522806945

https://marc.info/?l=linux-kernel&m=152460926619256

http://seclists.org/oss-sec/2018/q2/67

Introduced by:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=212925802454672e6cd2949a727f5e2c1377bf06

An upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=27ae357fa82be5ab73b2ef8d39dcb8ca2563483a

Comment 1 Adam Mariš 2018-04-18 08:29:30 UTC
Acknowledgments:

Name: David Rientjes (Google)

Comment 6 Adam Mariš 2018-04-25 07:58:22 UTC
Public via:

http://seclists.org/oss-sec/2018/q2/67

Comment 7 Adam Mariš 2018-04-25 07:59:21 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1571596]

Comment 9 Justin M. Forbes 2018-04-25 12:17:05 UTC
This was fixed for Fedora with the 4.15 rebases

Comment 12 errata-xmlrpc 2018-10-30 09:00:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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


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