lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 29 Apr 2009 10:29:06 +1000 (EST) From: James Morris <jmorris@...ei.org> To: Oleg Nesterov <oleg@...hat.com> cc: David Howells <dhowells@...hat.com>, Eric Paris <eparis@...isplace.org>, Roland McGrath <roland@...hat.com>, Stephen Smalley <sds@...ho.nsa.gov>, linux-kernel@...r.kernel.org Subject: Re: Q: selinux_bprm_committed_creds() && signals/do_wait On Wed, 29 Apr 2009, Oleg Nesterov wrote: > selinux_bprm_committed_creds: > > rc = avc_has_perm() > if (rc) { > flush_signals(current); > > This doesn't look right. If the task was SIGKILL'ed we must not proceed, > the task should die. The fix is simple, we should check SIGNAL_GROUP_EXIT > and do nothing in this case, the task will exit before return to user > space. If SIGNAL_GROUP_EXIT is set, it is just wrong to drop SIGKILL and > continue. I'm not quite sure what you're asking. This is a permission check to see if the new task can inherit the signal state of the parent, and if not, the new task's signal state is flushed. Where does a consideration of SIGKILL arise? > But, before fixing, I'd like to understand why we are doing > > flush_signal_handlers(current, 1); > sigemptyset(¤t->blocked); > > later. Could someone explain ? This looks unneeded. This is part of clearing all the signal state in the child. > > > Another question, > > wake_up_interruptible(¤t->parent->signal->wait_chldexit); > > Shouldn't we use ->real_parent ? Afaics, we shouldn't worry about the tracer > if current is ptraced, exec must not succeed if the tracer has no rights to > trace this task after cred changing. But we should notify ->real_parent which > is, well, real parent. > > Also, we don't need _irq to take tasklist_lock, and we don't actually need > ->siglock. > > Oleg. > -- James Morris <jmorris@...ei.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists