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] [day] [month] [year] [list]
Message-ID: <20250801041217.2797470-1-lizhi.xu@windriver.com>
Date: Fri, 1 Aug 2025 12:12:17 +0800
From: Lizhi Xu <lizhi.xu@...driver.com>
To: <syzbot+f2b9fe431c853e793948@...kaller.appspotmail.com>
CC: <agruenba@...hat.com>, <gfs2@...ts.linux.dev>,
        <linux-kernel@...r.kernel.org>, <syzkaller-bugs@...glegroups.com>
Subject: [PATCH] gfs2: Correct use of trans

There are too many factors interfering with current->journal_info(for
example: dirty inode, write jdata batch, etc.). When trans begins, the
current->journal_info is set to a new value, but when trans ends, it is
set to NULL.

When revoking a trans, use the trans in bufdata directly.

Fixes: 75f2b879aeb3 ("GFS2: Merge revoke adding functions")
Reported-by: syzbot+f2b9fe431c853e793948@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f2b9fe431c853e793948
Tested-by: syzbot+f2b9fe431c853e793948@...kaller.appspotmail.com
Signed-off-by: Lizhi Xu <lizhi.xu@...driver.com>
---
 fs/gfs2/trans.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 075f7e9abe47..d1a34f928a18 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -314,7 +314,7 @@ void gfs2_trans_add_meta(struct gfs2_glock *gl, struct buffer_head *bh)
 
 void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
 {
-	struct gfs2_trans *tr = current->journal_info;
+	struct gfs2_trans *tr = bd->bd_tr;
 
 	BUG_ON(!list_empty(&bd->bd_list));
 	gfs2_add_revoke(sdp, bd);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ