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]
Message-ID: <20210616082327.GP9782@pengutronix.de>
Date:   Wed, 16 Jun 2021 10:23:27 +0200
From:   Sascha Hauer <s.hauer@...gutronix.de>
To:     Zhihao Cheng <chengzhihao1@...wei.com>
Cc:     richard@....at, yangds.fnst@...fujitsu.com, yi.zhang@...wei.com,
        houtao1@...wei.com, yukuai3@...wei.com,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ubifs: Fix races between xattr_{set|get} and
 listxattr operations

Hi,

On Mon, May 31, 2021 at 08:52:09PM +0800, Zhihao Cheng wrote:
> UBIFS may occur some problems with concurrent xattr_{set|get} and
> listxattr operations, such as assertion failure, memory corruption,
> stale xattr value[1].
> 
> Fix it by importing a new rw-lock in @ubifs_inode to serilize write
> operations on xattr, concurrent read operations are still effective,
> just like ext4.
> 
> [1] https://lore.kernel.org/linux-mtd/20200630130438.141649-1-houtao1@huawei.com

I had a closer look at it and reviewed that you carefully release the
lock where you claimed it. I can't tell if adding this lock is the right
approach, but for what it's worth you can add my

Reviewed-by: Sascha Hauer <s.hauer@...gutronix.de>

> --- a/fs/ubifs/ubifs.h
> +++ b/fs/ubifs/ubifs.h
> @@ -356,6 +356,7 @@ struct ubifs_gced_idx_leb {
>   * @ui_mutex: serializes inode write-back with the rest of VFS operations,
>   *            serializes "clean <-> dirty" state changes, serializes bulk-read,
>   *            protects @dirty, @bulk_read, @ui_size, and @xattr_size
> + * @xattr_sem: serilizes write operations (remove|set|create) on xattr

s/serilizes/serializes/

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ