diff options
author | Kees Cook <keescook@chromium.org> | 2012-07-30 17:39:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:11 -0400 |
commit | 54b501992dd2a839e94e76aa392c392b55080ce8 (patch) | |
tree | 6d174fb95516f01e385d31d5ef87a248d8740fd2 /include/linux/sched.h | |
parent | 9520628e8ceb69fa9a4aee6b57f22675d9e1b709 (diff) |
coredump: warn about unsafe suid_dumpable / core_pattern combo
When suid_dumpable=2, detect unsafe core_pattern settings and warn when
they are seen.
Signed-off-by: Kees Cook <keescook@chromium.org>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alan Cox <alan@linux.intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Doug Ledford <dledford@redhat.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: James Morris <james.l.morris@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index a721cef7e2d4..1e26a5e45aa6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -406,6 +406,11 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | |||
406 | extern void set_dumpable(struct mm_struct *mm, int value); | 406 | extern void set_dumpable(struct mm_struct *mm, int value); |
407 | extern int get_dumpable(struct mm_struct *mm); | 407 | extern int get_dumpable(struct mm_struct *mm); |
408 | 408 | ||
409 | /* get/set_dumpable() values */ | ||
410 | #define SUID_DUMPABLE_DISABLED 0 | ||
411 | #define SUID_DUMPABLE_ENABLED 1 | ||
412 | #define SUID_DUMPABLE_SAFE 2 | ||
413 | |||
409 | /* mm flags */ | 414 | /* mm flags */ |
410 | /* dumpable bits */ | 415 | /* dumpable bits */ |
411 | #define MMF_DUMPABLE 0 /* core dump is permitted */ | 416 | #define MMF_DUMPABLE 0 /* core dump is permitted */ |