Revert "Revert "exec: Ensure mm->user_ns contains the execed files"" 70/209270/2 accepted/tizen/unified/20190705.110605 submit/tizen/20190705.061120
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 4 Jul 2019 07:43:42 +0000 (16:43 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 4 Jul 2019 07:43:42 +0000 (16:43 +0900)
commit0b215a809775f1e45f19b282b6ef64c7436e96cf
treeb96a6d78bf8025be5f8bee2a546d21cd003c2c32
parent757f9183652ee6738ce1476db11595775f2ae251
Revert "Revert "exec: Ensure mm->user_ns contains the execed files""

This reverts commit bbfdec4e6db8c7d95cb5a370f393ad872bbd608a.

The last backport calls improperly would_dump() after calling
exec_binprm() and it causes NULL pointer deference. Fix the issue
by moving would_dump() to proper position.

Change-Id: Ia957cda5d4126675ea18fc095e273f43d2f5dcd5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
fs/exec.c
include/linux/capability.h
kernel/capability.c