syzbot


KMSAN: uninit-value in from_kuid

Status: fixed on 2022/03/08 16:11
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+dfac92a50024b54acaa4@syzkaller.appspotmail.com
Fix commit: 3cb6ee991496 9p: only copy valid iattrs in 9P2000.L setattr implementation
First crash: 1051d, last: 969d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH 5.15 00/28] 5.15.16-rc1 review 35 (35) 2022/01/22 00:29
[PATCH 5.10 00/23] 5.10.93-rc1 review 33 (33) 2022/01/21 15:52
[PATCH 5.16 00/28] 5.16.2-rc1 review 41 (41) 2022/01/20 00:44
[syzbot] KMSAN: uninit-value in from_kuid 4 (5) 2021/11/29 15:52
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in from_kuid (2) ocfs2 C 46 1h25m 18d 0/28 upstream: reported C repro on 2024/09/20 15:21
upstream KMSAN: uninit-value in tomoyo_path_chown fs C 13763 749d 750d 22/28 fixed on 2023/02/24 13:50

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in map_id_up_base kernel/user_namespace.c:335 [inline]
BUG: KMSAN: uninit-value in map_id_up kernel/user_namespace.c:365 [inline]
BUG: KMSAN: uninit-value in from_kuid+0x51d/0xbd0 kernel/user_namespace.c:413
 map_id_up_base kernel/user_namespace.c:335 [inline]
 map_id_up kernel/user_namespace.c:365 [inline]
 from_kuid+0x51d/0xbd0 kernel/user_namespace.c:413
 p9pdu_vwritef+0x15aa/0x5100 net/9p/protocol.c:398
 p9pdu_writef+0x240/0x290 net/9p/protocol.c:539
 p9pdu_vwritef+0x21ed/0x5100 net/9p/protocol.c:490
 p9_client_prepare_req+0xe64/0x16d0 net/9p/client.c:703
 p9_client_rpc+0x28b/0x1460 net/9p/client.c:734
 p9_client_setattr+0x113/0x2c0 net/9p/client.c:1894
 v9fs_vfs_setattr_dotl+0x7e2/0xd70 fs/9p/vfs_inode_dotl.c:588
 notify_change+0x1fde/0x2180 fs/attr.c:410
 vfs_utimes+0x8a0/0xc50 fs/utimes.c:65
 do_utimes_path fs/utimes.c:98 [inline]
 do_utimes fs/utimes.c:144 [inline]
 __do_sys_utime32 fs/utimes.c:247 [inline]
 __se_sys_utime32+0x37c/0x510 fs/utimes.c:235
 __ia32_sys_utime32+0x91/0xc0 fs/utimes.c:235
 do_syscall_32_irqs_on arch/x86/entry/common.c:114 [inline]
 __do_fast_syscall_32+0x96/0xf0 arch/x86/entry/common.c:180
 do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:205
 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:248
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c

Uninit was stored to memory at:
 v9fs_vfs_setattr_dotl+0x58a/0xd70 fs/9p/vfs_inode_dotl.c:565
 notify_change+0x1fde/0x2180 fs/attr.c:410
 vfs_utimes+0x8a0/0xc50 fs/utimes.c:65
 do_utimes_path fs/utimes.c:98 [inline]
 do_utimes fs/utimes.c:144 [inline]
 __do_sys_utime32 fs/utimes.c:247 [inline]
 __se_sys_utime32+0x37c/0x510 fs/utimes.c:235
 __ia32_sys_utime32+0x91/0xc0 fs/utimes.c:235
 do_syscall_32_irqs_on arch/x86/entry/common.c:114 [inline]
 __do_fast_syscall_32+0x96/0xf0 arch/x86/entry/common.c:180
 do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:205
 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:248
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c

Local variable newattrs created at:
 vfs_utimes+0x69/0xc50 fs/utimes.c:22
 do_utimes_path fs/utimes.c:98 [inline]
 do_utimes fs/utimes.c:144 [inline]
 __do_sys_utime32 fs/utimes.c:247 [inline]
 __se_sys_utime32+0x37c/0x510 fs/utimes.c:235

CPU: 0 PID: 16553 Comm: syz-executor.2 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/12 07:18 https://github.com/google/kmsan.git master 85cfd6e539bd 8b9ca619 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2022/02/05 04:37 https://github.com/google/kmsan.git master 85cfd6e539bd e13a05ed .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2022/01/31 04:44 https://github.com/google/kmsan.git master 85cfd6e539bd 495e00c5 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2022/01/09 10:04 https://github.com/google/kmsan.git master 81c325bbf94e 2ca0d385 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2022/01/01 03:47 https://github.com/google/kmsan.git master 81c325bbf94e e1768e9c .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2021/12/31 10:54 https://github.com/google/kmsan.git master 81c325bbf94e 36bd2e48 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2021/12/15 11:17 https://github.com/google/kmsan.git master d1daf229a313 f752fb53 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2021/12/10 09:12 https://github.com/google/kmsan.git master 8b936c96768e 4d4ce9bc .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2021/12/08 02:12 https://github.com/google/kmsan.git master 8b936c96768e 0230ba3e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
2021/11/22 10:36 https://github.com/google/kmsan.git master 425295055ce6 4eb20a4e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in from_kuid
* Struck through repros no longer work on HEAD.