[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wi125+Fsdo1FY1QnjSLqHobRCO3nqKLqyU+Gm97ESJhnQ@mail.gmail.com>
Date: Wed, 29 Apr 2020 11:57:29 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jann Horn <jannh@...gle.com>
Cc: Oleg Nesterov <oleg@...hat.com>,
Bernd Edlinger <bernd.edlinger@...mail.de>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Waiman Long <longman@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alexey Gladkov <gladkov.alexey@...il.com>
Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1
On Wed, Apr 29, 2020 at 11:33 AM Jann Horn <jannh@...gle.com> wrote:
>
> > That sequence count approach would be a much simpler change.
>
> In that model, what should happen if someone tries to attach to a
> process that's in execve(), but after the point of no return in
> de_thread()? "Abort" after the point of no return normally means
> force_sigsegv(), right?
It would by definition have to check the sequence number at the end of
install_exec_creds() (where we currently release the
cred_guard_mutex).
And yes, that's after the point of no return, so it would cause the
usual "kill the process".
We could check earlier too (while still able to return errors) and
return -EAGAIN or something, but that wouldn't obviate the need for
that final check, iut would just shrink the window for the "fatal
exec" case.
Linus
Powered by blists - more mailing lists