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
Acknowledgments: Name: David Rientjes (Google)
Public via: http://seclists.org/oss-sec/2018/q2/67
Created kernel tracking bugs for this issue: Affects: fedora-all [bug 1571596]
This was fixed for Fedora with the 4.15 rebases
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