[syzbot] [ocfs2?] KMSAN: uninit-value in from_kuid (2)

syzbot
2024-09-20T15:21:23Z

Hello,

syzbot found the following issue on:

HEAD commit: 2004cef11ea0 Merge tag 'sched-core-2024-09-19' of git://gi..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1737fb00580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ea86c03799707382
dashboard link: https://syzkaller.appspot.com/bug?extid=6c55f725d1bdc8c52058
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ad1607980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10b7fb00580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/712bb1e6270f/disk-2004cef1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4c85f46e8c8b/vmlinux-2004cef1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9e811c6cc65b/bzImage-2004cef1.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2a5b0a53fa65/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6c55f725d1bdc8c52058@syzkaller.appspotmail.com

ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode.
=====================================================
BUG: KMSAN: uninit-value in map_id_up_base kernel/user_namespace.c:355 [inline]
BUG: KMSAN: uninit-value in map_id_up kernel/user_namespace.c:385 [inline]
BUG: KMSAN: uninit-value in from_kuid+0x41e/0x990 kernel/user_namespace.c:433
map_id_up_base kernel/user_namespace.c:355 [inline]
map_id_up kernel/user_namespace.c:385 [inline]
from_kuid+0x41e/0x990 kernel/user_namespace.c:433
ocfs2_setattr+0x254/0x3140 fs/ocfs2/file.c:1133
notify_change+0x1a8e/0x1b80 fs/attr.c:503
do_truncate fs/open.c:65 [inline]
do_ftruncate+0x8c1/0xbf0 fs/open.c:181
do_sys_ftruncate fs/open.c:199 [inline]
__do_sys_ftruncate fs/open.c:207 [inline]
__se_sys_ftruncate fs/open.c:205 [inline]
__x64_sys_ftruncate+0x133/0x280 fs/open.c:205
x64_sys_call+0x9e4/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:78
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable newattrs.i created at:
do_truncate fs/open.c:43 [inline]
do_ftruncate+0x600/0xbf0 fs/open.c:181
do_sys_ftruncate fs/open.c:199 [inline]
__do_sys_ftruncate fs/open.c:207 [inline]
__se_sys_ftruncate fs/open.c:205 [inline]
__x64_sys_ftruncate+0x133/0x280 fs/open.c:205

CPU: 0 UID: 0 PID: 5177 Comm: syz-executor217 Not tainted 6.11.0-syzkaller-07337-g2004cef11ea0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
=====================================================

---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup