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-prev] [day] [month] [year] [list]
Message-ID: <87mtr6gdvi.fsf@collabora.com>
Date:   Thu, 01 Jul 2021 13:09:21 -0400
From:   Gabriel Krisman Bertazi <krisman@...labora.com>
To:     ebiederm@...ssion.com (Eric W. Biederman)
Cc:     luto@...nel.org, tglx@...utronix.de, keescook@...omium.org,
        gofmanp@...il.com, christian.brauner@...ntu.com,
        peterz@...radead.org, willy@...radead.org, shuah@...nel.org,
        linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
        linux-kselftest@...r.kernel.org, x86@...nel.org,
        kernel@...labora.com
Subject: Re: [PATCH v8 3/7] kernel: Implement selective syscall userspace
 redirection

ebiederm@...ssion.com (Eric W. Biederman) writes:

> Why does do_syscal_user_dispatch call do_exit(SIGSEGV) and
> do_exit(SIGSYS) instead of force_sig(SIGSEGV) and force_sig(SIGSYS)?
>
> Looking at the code these cases are not expected to happen, so I would
> be surprised if userspace depends on any particular behaviour on the
> failure path so I think we can change this.

Hi Eric,

There is not really a good reason, and the use case that originated the
feature doesn't rely on it.

Unless I'm missing yet another problem and others correct me, I think
it makes sense to change it as you described.

> Is using do_exit in this way something you copied from seccomp?

I'm not sure, its been a while, but I think it might be just that.  The
first prototype of SUD was implemented as a seccomp mode.

> The reason I am asking is that by using do_exit you deprive userspace
> of the change to catch the signal handler and try and fix things.
>
> Also by using do_exit only a single thread of a multi-thread application
> is terminated which seems wrong.
>
> I am asking because I am going through the callers of do_exit so I can
> refactor things and clean things up and this use just looks wrong.

Thanks,

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ