diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2017-01-10 12:28:32 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2017-01-12 11:10:57 -0500 |
commit | 3a2f5a59a695a73e0cde9a61e0feae5fa730e936 (patch) | |
tree | 058704d18e909a2c0b46356c74d3c1156c2206aa /security/security.c | |
parent | b4ba35c75a0671a06b978b6386b54148efddf39f (diff) |
security,selinux,smack: kill security_task_wait hook
As reported by yangshukui, a permission denial from security_task_wait()
can lead to a soft lockup in zap_pid_ns_processes() since it only expects
sys_wait4() to return 0 or -ECHILD. Further, security_task_wait() can
in general lead to zombies; in the absence of some way to automatically
reparent a child process upon a denial, the hook is not useful. Remove
the security hook and its implementations in SELinux and Smack. Smack
already removed its check from its hook.
Reported-by: yangshukui <yangshukui@huawei.com>
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/security/security.c b/security/security.c index 32052f5c76b2..8c9fee59e60a 100644 --- a/security/security.c +++ b/security/security.c | |||
@@ -1025,11 +1025,6 @@ int security_task_kill(struct task_struct *p, struct siginfo *info, | |||
1025 | return call_int_hook(task_kill, 0, p, info, sig, secid); | 1025 | return call_int_hook(task_kill, 0, p, info, sig, secid); |
1026 | } | 1026 | } |
1027 | 1027 | ||
1028 | int security_task_wait(struct task_struct *p) | ||
1029 | { | ||
1030 | return call_int_hook(task_wait, 0, p); | ||
1031 | } | ||
1032 | |||
1033 | int security_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 1028 | int security_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
1034 | unsigned long arg4, unsigned long arg5) | 1029 | unsigned long arg4, unsigned long arg5) |
1035 | { | 1030 | { |
@@ -1769,7 +1764,6 @@ struct security_hook_heads security_hook_heads = { | |||
1769 | .task_movememory = | 1764 | .task_movememory = |
1770 | LIST_HEAD_INIT(security_hook_heads.task_movememory), | 1765 | LIST_HEAD_INIT(security_hook_heads.task_movememory), |
1771 | .task_kill = LIST_HEAD_INIT(security_hook_heads.task_kill), | 1766 | .task_kill = LIST_HEAD_INIT(security_hook_heads.task_kill), |
1772 | .task_wait = LIST_HEAD_INIT(security_hook_heads.task_wait), | ||
1773 | .task_prctl = LIST_HEAD_INIT(security_hook_heads.task_prctl), | 1767 | .task_prctl = LIST_HEAD_INIT(security_hook_heads.task_prctl), |
1774 | .task_to_inode = | 1768 | .task_to_inode = |
1775 | LIST_HEAD_INIT(security_hook_heads.task_to_inode), | 1769 | LIST_HEAD_INIT(security_hook_heads.task_to_inode), |