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>
This commit is contained in:

committed by
Paul Moore

parent
b4ba35c75a
commit
3a2f5a59a6
@@ -666,11 +666,6 @@
|
||||
* @sig contains the signal value.
|
||||
* @secid contains the sid of the process where the signal originated
|
||||
* Return 0 if permission is granted.
|
||||
* @task_wait:
|
||||
* Check permission before allowing a process to reap a child process @p
|
||||
* and collect its status information.
|
||||
* @p contains the task_struct for process.
|
||||
* Return 0 if permission is granted.
|
||||
* @task_prctl:
|
||||
* Check permission before performing a process control operation on the
|
||||
* current process.
|
||||
@@ -1507,7 +1502,6 @@ union security_list_options {
|
||||
int (*task_movememory)(struct task_struct *p);
|
||||
int (*task_kill)(struct task_struct *p, struct siginfo *info,
|
||||
int sig, u32 secid);
|
||||
int (*task_wait)(struct task_struct *p);
|
||||
int (*task_prctl)(int option, unsigned long arg2, unsigned long arg3,
|
||||
unsigned long arg4, unsigned long arg5);
|
||||
void (*task_to_inode)(struct task_struct *p, struct inode *inode);
|
||||
@@ -1767,7 +1761,6 @@ struct security_hook_heads {
|
||||
struct list_head task_getscheduler;
|
||||
struct list_head task_movememory;
|
||||
struct list_head task_kill;
|
||||
struct list_head task_wait;
|
||||
struct list_head task_prctl;
|
||||
struct list_head task_to_inode;
|
||||
struct list_head ipc_permission;
|
||||
|
Reference in New Issue
Block a user