Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC

From: Linus Torvalds
Date: Tue Oct 03 2017 - 12:10:10 EST


On Tue, Oct 3, 2017 at 7:46 AM, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>
> The process that requests the signal be sent is the process that is
> receiving the signal. I can see a theoretical need for a permission
> check in there somewhere (especially as this persists over fork).

Note that it also persists over not just fork, but execve() too.

Yes, the signal is cleared if the e[ug]id/fs[ug]id is changed by exec,
but not (for example) if just uid is changed.

Does that matter? Probably not. But signal handling does actually
check uid, so it does actually affect signal permission checks across
execve.

I'm not entirely convinced about this patch. The parent death signal
has been problematic before, I'm not sure we want to add to the whole
situation without very strong arguments.

Linus