]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp: Only dump core when single-threaded
authorKees Cook <keescook@chromium.org>
Tue, 7 Feb 2017 23:18:51 +0000 (15:18 -0800)
committerJames Morris <james.l.morris@oracle.com>
Wed, 22 Feb 2017 22:42:35 +0000 (09:42 +1100)
commit82e9fba39054591bb591fb9997f2aff58c2727f8
treee3b752b1b1a94ff0794e29e5658dfd48dd9b7d4d
parenta730baf83d139a9643a848cbd62987ee41741fa6
seccomp: Only dump core when single-threaded

The SECCOMP_RET_KILL filter return code has always killed the current
thread, not the entire process. Changing this as a side-effect of dumping
core isn't a safe thing to do (a few test suites have already flagged this
behavioral change). Instead, restore the RET_KILL semantics, but still
dump core when a RET_KILL delivers SIGSYS to a single-threaded process.

Fixes: 38f1d05e738b ("seccomp: dump core when using SECCOMP_RET_KILL")
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
kernel/seccomp.c