Alessandro Zanni 15f3434748
fs: Fix uninitialized value issue in from_kuid and from_kgid
ocfs2_setattr() uses attr->ia_mode, attr->ia_uid and attr->ia_gid in
a trace point even though ATTR_MODE, ATTR_UID and ATTR_GID aren't set.

Initialize all fields of newattrs to avoid uninitialized variables, by
checking if ATTR_MODE, ATTR_UID, ATTR_GID are initialized, otherwise 0.

Reported-by: syzbot+6c55f725d1bdc8c52058@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058
Signed-off-by: Alessandro Zanni <alessandro.zanni87@gmail.com>
Link: https://lore.kernel.org/r/20241017120553.55331-1-alessandro.zanni87@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2024-10-17 15:33:43 +02:00
..
2023-01-19 09:24:27 +01:00
2024-04-25 21:07:04 -07:00
2024-09-12 11:58:44 +02:00
2022-07-29 18:12:36 -07:00
2024-04-25 21:07:04 -07:00
2023-08-02 09:13:09 -06:00
2018-12-28 12:11:45 -08:00
\n
2024-09-23 10:49:28 -07:00
2022-05-09 16:21:46 -04:00