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: <20190526120719.GQ17978@ZenIV.linux.org.uk>
Date:   Sun, 26 May 2019 13:07:19 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     "J. R. Okajima" <hooanon05g@...il.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        kolyshkin@...il.com
Subject: Re: [PATCH] concrete /proc/mounts

On Sun, May 26, 2019 at 06:11:34PM +0900, J. R. Okajima wrote:
> commit 1e83f8634c6efe7dd4e6036ee202ca10bdbca0b3
> Author: J. R. Okajima <hooanon05g@...il.com>
> Date:   Sat May 25 18:35:13 2019 +0900
> 
>     concrete /proc/mounts
>     
>     When the size of /proc/mounts exceeds PAGE_SIZE, seq_read() has to
>     release namespace_sem via mounts_op.m_stop().  It means if someone else
>     issues mount(2) or umount(2) and the mounts list got changed, then the
>     continuous getmntent(3) calls show the incomplete mounts list and some
>     entries may not appear in it.
>     
>     This patch generates the full mounts list when mounts_op.m_start() is
>     called, and keep it in the seq_file buffer until the file is closed.
>     The size of the buffer increases if necessary.  Other operations m_next,
>     m_stop, m_show become meaningless, but still necessary for the seq_file
>     manner.
>     
>     I don't think the size of the buffer matters because many /proc entries
>     already keep the similar PAGE_SIZE buffer.  Increasing /proc/mounts
>     buffer is to keep the correctness of the mount list.
>     
>     Reported-by: Kirill Kolyshkin <kolyshkin@...il.com>
>     See-also: https://github.com/kolyshkin/procfs-test
>     Signed-off-by: J. R. Okajima <hooanon05g@...il.com>

Translation: let's generate the entire contents on the first read() and keep
it until the sucker's closed; that way userland wont' see anything changing
under it.  Oh, wait...

NAK.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ