Re: Q: selinux_bprm_committed_creds() && signals/do_wait

From: Oleg Nesterov
Date: Wed Apr 29 2009 - 06:29:21 EST


On 04/29, David Howells wrote:
>
> Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> > we can flush the signal which was sent after we changed SID/cred and passed
> > the new permission checks,
>
> I think you mean to say, rather, that we can *lose* a signal that was sent,
> because flush_signals() discards all pending signals unconditionally, and so
> SIGKILL can be lost?

Yes, thanks.

> I suspect we should pass SIGKILL

Or we can fliter out SIGKILLs, yes.

But this doesn't differ from "do nothing if SIGNAL_GROUP_EXIT", except needs
a bit more changes. If SIGNAL_GROUP_EXIT is true, we must have a pending
SIGKILL. Either way the task never returns to user-space.

> and possibly SIGSTOP through the flush.

Yes, perhaps... But I don't know if this is right from the selinux pov.
Perhaps it was queued before we changed SID.

And. It is possible that the task/user who sent SIGSTOP before changing
SID will not able to send SIGCONT later.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/