[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_5292EF864E49B52EDC6EF0CC99A7E4C6C306@qq.com>
Date: Wed, 3 Jan 2024 20:13:16 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+74dce9511a59ad67a492@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [reiserfs?] general protection fault in reiserfs_xattr_set
please test null ptr deref in reiserfs_xattr_set
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 453f5db0619e
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 998035a6388e..00fd8f747394 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -618,6 +618,9 @@ int reiserfs_xattr_set(struct inode *inode, const char *name,
int error, error2;
size_t jbegin_count = reiserfs_xattr_nblocks(inode, buffer_size);
+ if (!reiserfs_xattrs_initialized(inode->i_sb))
+ return -EOPNOTSUPP;
+
/* Check before we start a transaction and then do nothing. */
if (!d_really_is_positive(REISERFS_SB(inode->i_sb)->priv_root))
return -EOPNOTSUPP;
Powered by blists - more mailing lists