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: <CADd0cq21TfsncsoViQD+1Q=GKyjG5fKuWEnZr8JxevLh3mSeag@mail.gmail.com>
Date:   Mon, 17 Dec 2018 12:21:40 +0800
From:   程洋 <d17103513@...il.com>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Howells <dhowells@...hat.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Johannes Weiner <hannes@...xchg.org>,
        Davidlohr Bueso <dbueso@...e.de>, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: > [PATCH] Security: Handle hidepid option correctly

Actually I'm pretty sure kernel calls proc_mount()
Here is the call stack
[    0.003450] [<ffffff8bef2a0190>] proc_mount+0x2c/0x98
[    0.003459] [<ffffff8bef22e560>] mount_fs+0x164/0x190
[    0.003465] [<ffffff8bef24c138>] vfs_kern_mount+0x74/0x168
[    0.003469] [<ffffff8bef24c244>] kern_mount_data+0x18/0x30
[    0.003474] [<ffffff8bef2a0258>] pid_ns_prepare_proc+0x24/0x40
[    0.003484] [<ffffff8bef0cd5ec>] alloc_pid+0x498/0x4b4
[    0.003492] [<ffffff8bef0a9b94>] copy_process.isra.73.part.74+0xed0/0x1708
[    0.003496] [<ffffff8bef0aa560>] _do_fork+0xdc/0x3f8
[    0.003501] [<ffffff8bef0aa8c8>] kernel_thread+0x34/0x3c
[    0.003511] [<ffffff8bf00cd498>] rest_init+0x20/0x80
[    0.003522] [<ffffff8bf0c00c7c>] start_kernel+0x3e4/0x43c
[    0.003527] [<ffffff8bf0c001e8>] __primary_switched+0x64/0x90
Alexey Dobriyan <adobriyan@...il.com> 于2018年12月14日周五 下午11:44写道:
>
> On Wed, Dec 05, 2018 at 03:26:04PM +0800, 程洋 wrote:
> > Anyone who can review my patch?
> >
> > 程洋 <chengyang@...omi.com> 于2018年11月30日周五 上午10:34写道:
> > >
> > > Here is an article illustrates the details.
> > > https://medium.com/@topjohnwu/from-anime-game-to-android-system-security-vulnerability-9b955a182f20
> > >
> > > And There is a similar fix on kernel-4.4:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=99663be772c827b8f5f594fe87eb4807be1994e5
> > >
> > > Q: Other filesystems parse the options from fill_super().  Is proc special in some fashion?
> > > A: According to my research, start_kernel will call proc_mount first, and initialize sb->s_root before any userspace process runs. If others want to mount it, all options will be ignored.
> > >      AOSP change here: https://android-review.googlesource.com/c/platform/system/core/+/181345/4/init/init.cpp
> > >      At first I though we should mount it with MS_REMOUNT flag. But kernel will crash if we did this.
>
> This is not true: /proc is mounted by userspace (and it is easy to see
> from the fact that proc_mount() is not called from kernel anywhere).
>
> hidepid= in its current form is misdesigned, so might as well not bother
> changing anything. IIRC there were(?) patches to make it per-mount.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ