All of lore.kernel.org
 help / color / mirror / Atom feed
* Q: selinux_bprm_committed_creds() && signals/do_wait
@ 2009-04-28 22:30 Oleg Nesterov
  2009-04-28 23:33 ` Oleg Nesterov
                   ` (5 more replies)
  0 siblings, 6 replies; 38+ messages in thread
From: Oleg Nesterov @ 2009-04-28 22:30 UTC (permalink / raw)
  To: David Howells, Eric Paris, James Morris, Roland McGrath, Stephen Smalley
  Cc: linux-kernel

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.

But, before fixing, I'd like to understand why we are doing

		flush_signal_handlers(current, 1);
		sigemptyset(&current->blocked);

later. Could someone explain ? This looks unneeded.


Another question,

	wake_up_interruptible(&current->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.


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2009-05-06 11:54 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-28 22:30 Q: selinux_bprm_committed_creds() && signals/do_wait Oleg Nesterov
2009-04-28 23:33 ` Oleg Nesterov
2009-04-29 16:01   ` [PATCH] do_wait: do take security_task_wait() into account Oleg Nesterov
2009-04-30 20:31     ` Roland McGrath
2009-04-30 22:51     ` James Morris
2009-05-06 11:46       ` Stephen Smalley
2009-04-29  0:29 ` Q: selinux_bprm_committed_creds() && signals/do_wait James Morris
2009-04-29  6:58   ` Oleg Nesterov
2009-04-29 12:20     ` Stephen Smalley
2009-04-29 12:56       ` Oleg Nesterov
2009-04-29 13:16         ` Stephen Smalley
2009-04-29 13:42           ` Oleg Nesterov
2009-04-29 13:43             ` Stephen Smalley
2009-04-29 14:47           ` Alan Cox
2009-04-29 15:39             ` Stephen Smalley
2009-04-29 10:02   ` David Howells
2009-04-29 10:25     ` Oleg Nesterov
2009-04-29 11:17     ` David Howells
2009-04-29 11:55       ` Oleg Nesterov
2009-04-29 12:42       ` David Howells
2009-04-29 12:45       ` David Howells
2009-04-29 13:28         ` Oleg Nesterov
2009-04-30  0:37           ` James Morris
2009-04-29 13:18 ` Stephen Smalley
2009-04-29 13:30   ` Oleg Nesterov
2009-04-29 14:02   ` ptrace: selinux_bprm_committed_creds: simplify __wake_up_parent() code and s/parent/real_parent/ Oleg Nesterov
2009-04-29 14:08     ` Oleg Nesterov
2009-04-30 22:44       ` Roland McGrath
2009-05-03 20:10         ` Oleg Nesterov
2009-05-04 17:38           ` Roland McGrath
2009-04-30  0:38     ` James Morris
2009-04-30 22:38     ` Roland McGrath
2009-04-29 14:48 ` Q: selinux_bprm_committed_creds() && signals/do_wait Alan Cox
2009-05-01  0:02 ` Roland McGrath
2009-05-03 20:21   ` Oleg Nesterov
2009-05-04 17:34     ` Roland McGrath
2009-05-01  0:44 ` David Howells
2009-05-01  0:50   ` Roland McGrath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.