lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wjC7GmCHTkoz2_CkgSc_Cgy19qwSQgJGXz+v2f=KT3UOw@mail.gmail.com>
Date:   Wed, 9 Jun 2021 13:33:36 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     "Eric W. Biederman" <ebiederm@...ssion.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        io-uring <io-uring@...r.kernel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Olivier Langlois <olivier@...llion01.com>,
        Jens Axboe <axboe@...nel.dk>,
        "Pavel Begunkov>" <asml.silence@...il.com>,
        Oleg Nesterov <oleg@...hat.com>
Subject: Re: [RFC] coredump: Do not interrupt dump for TIF_NOTIFY_SIGNAL

On Wed, Jun 9, 2021 at 1:17 PM Eric W. Biederman <ebiederm@...ssion.com> wrote:
>>
> In short the coredump code deliberately supports being interrupted by
> SIGKILL, and depends upon prepare_signal to filter out all other
> signals.

Hmm.

I have to say, that looks like the core reason for the bug: if you
want to be interrupted by a fatal signal, you shouldn't use
signal_pending(), you should use fatal_signal_pending().

Now, the fact that we haven't cleared TIF_NOTIFY_SIGNAL for the first
signal is clearly the immediate cause of this, but at the same time I
really get the feeling that that coredump aborting code should always
had used fatal_signal_pending().

We do want to be able to abort core-dumps (stuck network filesystems
is the traditional reason), but the fact that it used signal_pending()
looks buggy.

In fact, the very comment in that dump_interrupted() function seems to
acknowledge that signal_pending() is all kinds of silly.

So regardless of the fact that io_uring does seem to have messed up
this part of signals, I think the fix is not to change
signal_pending() to task_sigpending(), but to just do what the comment
suggests we should do.

But also:

> With the io_uring code comes an extra test in signal_pending
> for TIF_NOTIFY_SIGNAL (which is something about asking a task to run
> task_work_run).

Jens, is this still relevant? Maybe we can revert that whole series
now, and make the confusing difference between signal_pending() and
task_sigpending() go away again?

               Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ