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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce76e5f39c3c79add342e7302a2945e5c331cb42.camel@ibm.com>
Date: Thu, 29 May 2025 18:48:39 +0000
From: Viacheslav Dubeyko <Slava.Dubeyko@....com>
To: "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>
CC: "frank.li@...o.com" <frank.li@...o.com>,
        "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>,
        "linux-fsdevel@...r.kernel.org"
	<linux-fsdevel@...r.kernel.org>,
        "slava@...eyko.com" <slava@...eyko.com>,
        "syzbot+8c0bc9f818702ff75b76@...kaller.appspotmail.com"
	<syzbot+8c0bc9f818702ff75b76@...kaller.appspotmail.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ernesto.mnd.fernandez@...il.com" <ernesto.mnd.fernandez@...il.com>,
        "glaubitz@...sik.fu-berlin.de" <glaubitz@...sik.fu-berlin.de>
Subject: RE: [PATCH v2] hfsplus: remove mutex_lock check in hfsplus_free_extents

On Thu, 2025-05-29 at 19:36 +0100, Al Viro wrote:
> On Thu, May 29, 2025 at 06:34:43PM +0000, Viacheslav Dubeyko wrote:
> > > diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
> > > index a6d61685ae79..b1699b3c246a 100644
> > > --- a/fs/hfsplus/extents.c
> > > +++ b/fs/hfsplus/extents.c
> > > @@ -342,9 +342,6 @@ static int hfsplus_free_extents(struct super_block *sb,
> > >  	int i;
> > >  	int err = 0;
> > >  
> > > -	/* Mapping the allocation file may lock the extent tree */
> > > -	WARN_ON(mutex_is_locked(&HFSPLUS_SB(sb)->ext_tree->tree_lock));
> > > -
> > 
> > Makes sense to me. Looks good.
> > 
> > But I really like your mentioning of reproducing the issue in generic/013 and
> > really nice analysis of the issue there. Sadly, we haven't it in the comment. :)
> 
> Umm...  *Is* that thing safe to call without that lock?

As far as I can see, hfsplus_free_fork() works under ext_tree->tree_lock mutex
lock.
And hfsplus_free_extents() calls hfsplus_block_free(). This guy
uses sbi->alloc_mutex to protect free blocks operation. So, operation
should be mostly safe.

Thanks,
Slava.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ