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]
Date:   Wed, 23 Sep 2020 18:03:22 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Alexander Mikhalitsyn <alexander.mikhalitsyn@...tuozzo.com>
Cc:     avagin@...il.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] fsopen: fsconfig syscall restart fix

On Wed, Sep 23, 2020 at 07:46:36PM +0300, Alexander Mikhalitsyn wrote:
> During execution of vfs_fsconfig_locked function we can get ERESTARTNOINTR
> error (or other interrupt error). But we changing fs context fc->phase
> field to transient states and our entry fc->phase checks in switch cases
> (see FS_CONTEXT_CREATE_PARAMS, FS_CONTEXT_RECONF_PARAMS) will always fail
> after syscall restart which will lead to returning -EBUSY to the userspace.
> 
> The idea of the fix is to save entry-time fs_context phase field value and
> recover fc->phase value to the original one before exiting with
> "interrupt error" (ERESTARTNOINTR or similar).

If you have e.g. vfs_create_tree() fail in the middle of ->get_tree(),
the only thing you can do to that thing is to discard it.  The state is
*NOT* required to be recoverable after a failure exit - quite a bit of
config might've been consumed and freed by that point.

CREATE and RECONFIGURE are simply not restartable.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ