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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJmaN=mNVJVGPkwYvE6PmQSgT8o3Uo3=1iQm2NFicZ2fFC6Pxw@mail.gmail.com>
Date:   Tue, 17 Dec 2019 14:21:03 -0800
From:   Jesse Barnes <jsbarnes@...gle.com>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Ingo Molnar <mingo@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [GIT PULL] remove ksys_mount() and ksys_dup()

On Tue, Dec 17, 2019 at 12:40 PM Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> On Tue, Dec 17, 2019 at 11:33 AM Jesse Barnes <jsbarnes@...gle.com> wrote:
> >
> > Still debugging, but this causes a panic in console_on_rootfs() when we try to dup the fds for stderr and stdout.
>
> Duh.
>
> That series was incredibly buggy, and there's another bug in there.
>
> I think this should fix it:
>
>   diff --git a/init/main.c b/init/main.c
>   index ec3a1463ac69..1ecfd43ed464 100644
>   --- a/init/main.c
>   +++ b/init/main.c
>   @@ -1163,7 +1163,7 @@ void console_on_rootfs(void)
>
>           /* Open /dev/console in kernelspace, this should never fail */
>           file = filp_open("/dev/console", O_RDWR, 0);
>   -       if (!file)
>   +       if (IS_ERR(file))
>                   goto err_out;
>
>           /* create stdin/stdout/stderr, this should never fail */
>
> and yes,that particular problem only triggers when you have some odd
> root filesystem without a /dev/console. Or a kernel config that
> doesn't have those devices enabled at all.
>
> I delayed pulling it for a couple of days, but the branch was not in
> linux-next, so my delay didn't make any difference, and all these
> things only became obvious after I pulled. And while it was all
> horribly buggy, it was only buggy for the "these cases don't happen in
> a normal distro" case, so the regular use didn't show them.
>
> My bad. I shouldn't have pulled this, but it all looked very obvious
> and trivial.

Oh I should have caught that too, I was looking right at it...

But anyway it looks like a nice cleanup with a few more fixes.
Hopefully we can get there soon...

Thanks,
Jesse

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ