[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_E64425D6BAF8BBC833499EEE1BDC4BD41B08@qq.com>
Date: Sat, 21 Sep 2024 10:40:28 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+6c55f725d1bdc8c52058@...kaller.appspotmail.com
Cc: jlbec@...lplan.org,
joseph.qi@...ux.alibaba.com,
linux-kernel@...r.kernel.org,
mark@...heh.com,
ocfs2-devel@...ts.linux.dev,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [ocfs2?] KMSAN: uninit-value in from_kuid (2)
use inode's uid and gid to replace attr
#syz test
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index ccc57038a977..d4be183bf149 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1129,8 +1129,8 @@ int ocfs2_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
(unsigned long long)OCFS2_I(inode)->ip_blkno,
dentry->d_name.len, dentry->d_name.name,
attr->ia_valid, attr->ia_mode,
- from_kuid(&init_user_ns, attr->ia_uid),
- from_kgid(&init_user_ns, attr->ia_gid));
+ from_kuid(&init_user_ns, inode->i_uid),
+ from_kgid(&init_user_ns, inode->i_gid));
/* ensuring we don't even attempt to truncate a symlink */
if (S_ISLNK(inode->i_mode))
Powered by blists - more mailing lists