2021-06-10 21:40:15

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCHv8] exec: Fix dead-lock in de_thread with ptrace_attach

On Thu, 10 Jun 2021 09:31:42 +0200 Bernd Edlinger <[email protected]> wrote:

> This introduces signal->unsafe_execve_in_progress,
> which is used to fix the case when at least one of the
> sibling threads is traced, and therefore the trace
> process may dead-lock in ptrace_attach, but de_thread
> will need to wait for the tracer to continue execution.

Deadlocks are serious. Is this exploitable by unprivileged userspace?

> Signed-off-by: Bernd Edlinger <[email protected]>

Was a -stable backport considered?



2021-06-12 19:49:14

by Eric W. Biederman

[permalink] [raw]
Subject: Re: [PATCHv8] exec: Fix dead-lock in de_thread with ptrace_attach

Andrew Morton <[email protected]> writes:

> On Thu, 10 Jun 2021 09:31:42 +0200 Bernd Edlinger <[email protected]> wrote:
>
>> This introduces signal->unsafe_execve_in_progress,
>> which is used to fix the case when at least one of the
>> sibling threads is traced, and therefore the trace
>> process may dead-lock in ptrace_attach, but de_thread
>> will need to wait for the tracer to continue execution.
>
> Deadlocks are serious. Is this exploitable by unprivileged userspace?

The processes are killable so I don't think this is the serious in the
way you mean. In fact Linus has already said that it is not a deadlock.

Eric