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: <tencent_202369496E43BB4449F766177026C5536F05@qq.com>
Date: Tue, 12 Nov 2024 13:38:52 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+4cba2fd444e9a16ae758@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [hfs?] possible deadlock in hfsplus_file_extend (2)

AA lock, unlock for hfs_bmap_reserve.

#syz test

diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index a6d61685ae79..90366e2da3c7 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -101,7 +101,12 @@ static int __hfsplus_ext_write_extent(struct inode *inode,
 		if (res != -ENOENT)
 			return res;
 		/* Fail early and avoid ENOSPC during the btree operation */
+		mutex_unlock(&hip->extents_lock);
+		mutex_unlock(&fd->tree->tree_lock);
 		res = hfs_bmap_reserve(fd->tree, fd->tree->depth + 1);
+		mutex_lock(&hip->extents_lock);
+		mutex_lock_nested(&fd->tree->tree_lock,
+			hfsplus_btree_lock_class(fd->tree));
 		if (res)
 			return res;
 		hfs_brec_insert(fd, hip->cached_extents,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ