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_12296C83BC04535760577A26D4336AA36005@qq.com>
Date: Tue,  9 Apr 2024 09:16:21 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+27cc650ef45b379dfe5a@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: [syzbot] [erofs?] BUG: using smp_processor_id() in preemptible code in z_erofs_get_gbuf

please test wrong context using smp_processor_id

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 2b3d5988ae2c

diff --git a/fs/erofs/zutil.c b/fs/erofs/zutil.c
index 9687cad8be96..0a3d9eecbf16 100644
--- a/fs/erofs/zutil.c
+++ b/fs/erofs/zutil.c
@@ -35,8 +35,11 @@ void *z_erofs_get_gbuf(unsigned int requiredpages)
 	__acquires(gbuf->lock)
 {
 	struct z_erofs_gbuf *gbuf;
+	unsigned long flags;
 
+	local_irq_save(flags);
 	gbuf = &z_erofs_gbufpool[z_erofs_gbuf_id()];
+	local_irq_restore(flags);
 	spin_lock(&gbuf->lock);
 	/* check if the buffer is too small */
 	if (requiredpages > gbuf->nrpages) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ