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: <20250424-waldgebiet-mitinhaber-886939383e1f@brauner>
Date: Thu, 24 Apr 2025 10:40:14 +0200
From: Christian Brauner <brauner@...nel.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Christoph Hellwig <hch@....de>, rafael@...nel.org, dakr@...nel.org, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org, hca@...ux.ibm.com, 
	Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>, Xiao Ni <xni@...hat.com>
Subject: Re: [PATCH] devtmpfs: don't use vfs_getattr_nosec to query i_mode

On Wed, Apr 23, 2025 at 08:42:34AM +0200, Greg KH wrote:
> On Wed, Apr 23, 2025 at 07:54:51AM +0200, Christian Brauner wrote:
> > On Wed, Apr 23, 2025 at 06:59:41AM +0200, Christoph Hellwig wrote:
> > > The recent move of the bdev_statx call to the low-level vfs_getattr_nosec
> > > helper caused it being used by devtmpfs, which leads to deadlocks in
> > > md teardown due to the block device lookup and put interfering with the
> > > unusual lifetime rules in md.
> > > 
> > > But as handle_remove only works on inodes created and owned by devtmpfs
> > > itself there is no need to use vfs_getattr_nosec vs simply reading the
> > > mode from the inode directly.  Switch to that to avoid the bdev lookup
> > > or any other unintentional side effect.
> > > 
> > > Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>
> > > Reported-by: Xiao Ni <xni@...hat.com>
> > > Fixes: 777d0961ff95 ("fs: move the bdex_statx call to vfs_getattr_nosec")
> > > Signed-off-by: Christoph Hellwig <hch@....de>
> > > Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>
> > > Tested-by: Xiao Ni <xni@...hat.com>
> > > ---
> > 
> > Reviewed-by: Christian Brauner <brauner@...nel.org>
> 
> Do you want me to take this through the driver-core tree, or is this a
> fs-specific thing as that's where the regression showed up from?  Either
> is fine with me.

I'd grab it because it's a fixes for an earlier commit from Christoph.
I also need to check whether we need to revert the bdev_statx() addition
to vfs_getattr_nosec().

Thanks, Greg!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ