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]
Date:   Mon, 18 Dec 2017 16:19:48 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Laura Abbott <labbott@...hat.com>
Cc:     David Howells <dhowells@...hat.com>,
        Serge Hallyn <serge@...lyn.com>,
        James Morris <james.l.morris@...cle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Thorsten Leemhuis <regressions@...mhuis.info>,
        Martin Pitt <mpitt@...hat.com>
Subject: Re: Coredump regression with e37fdb785a5f ("exec: Use secureexec for
 setting dumpability")

On Mon, Dec 18, 2017 at 3:17 PM, Laura Abbott <labbott@...hat.com> wrote:
> Hi,
>
> Fedora got a bug report https://bugzilla.redhat.com/show_bug.cgi?id=1525974
> of coredumps failing for systemd units. If systemd units segfault, no
> core is produced.
>
> commit e37fdb785a5f95ecadf43b773c97f676500ac7b8 (refs/bisect/bad)
> Author: Kees Cook <keescook@...omium.org>
> Date:   Tue Jul 18 15:25:31 2017 -0700
>
>     exec: Use secureexec for setting dumpability
>         The examination of "current" to decide dumpability is wrong. This
> was a
>     check of and euid/uid (or egid/gid) mismatch in the existing process,
>     not the newly created one. This appears to stretch back into even the
>     "history.git" tree. Luckily, dumpability is later set in commit_creds().
>     In earlier kernel versions before creds existed, similar checks also
>     existed late in the exec flow, covering up the mistake as far back as I
>     could find.
>         Note that because the commit_creds() check examines differences of
> euid,
>     uid, egid, gid, and capabilities between the old and new creds, it would
>     look like the setup_new_exec() dumpability test could be entirely
> removed.
>     However, the secureexec test may cover a different set of tests
> (specific
>     to the LSMs) than what commit_creds() checks for. So, fix this test to
>     use secureexec (the removed euid tests are redundant to the commoncap
>     secureexec checks now).
>         Cc: David Howells <dhowells@...hat.com>
>     Signed-off-by: Kees Cook <keescook@...omium.org>
>     Acked-by: Serge Hallyn <serge@...lyn.com>
>     Reviewed-by: James Morris <james.l.morris@...cle.com>
>
>
> This was still broken as of -rc3 although interestingly enough this worked
> on my rawhide system. Any ideas?

Hmmm, interesting. So dumpability can't follow secureexec -- that
seems like a bad state since secureexec represents a process with
privilege...

-Kees

-- 
Kees Cook
Pixel Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ