syzbot


KMSAN: uninit-value in shrinker_alloc

Status: fixed on 2024/01/30 15:47
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com
Fix commit: 7fba9420b726 mm: shrinker: use kvzalloc_node() from expand_one_shrinker_info()
First crash: 320d, last: 305d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [mm?] KMSAN: uninit-value in shrinker_alloc 0 (1) 2024/01/02 13:55
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/12/11 12:07 19m retest repro upstream report log

Sample crash report:
RBP: 00007f43defc4120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 000000000000000b R14: 00007f43de39bf80 R15: 00007f43de4bfa48
 </TASK>
=====================================================
BUG: KMSAN: uninit-value in shrinker_unit_free mm/shrinker.c:33 [inline]
BUG: KMSAN: uninit-value in shrinker_unit_alloc mm/shrinker.c:52 [inline]
BUG: KMSAN: uninit-value in expand_one_shrinker_info mm/shrinker.c:136 [inline]
BUG: KMSAN: uninit-value in expand_shrinker_info mm/shrinker.c:165 [inline]
BUG: KMSAN: uninit-value in shrinker_memcg_alloc mm/shrinker.c:227 [inline]
BUG: KMSAN: uninit-value in shrinker_alloc+0xd7c/0x1100 mm/shrinker.c:697
 shrinker_unit_free mm/shrinker.c:33 [inline]
 shrinker_unit_alloc mm/shrinker.c:52 [inline]
 expand_one_shrinker_info mm/shrinker.c:136 [inline]
 expand_shrinker_info mm/shrinker.c:165 [inline]
 shrinker_memcg_alloc mm/shrinker.c:227 [inline]
 shrinker_alloc+0xd7c/0x1100 mm/shrinker.c:697
 alloc_super+0x9a6/0xf00 fs/super.c:386
 sget_fc+0x36b/0xf80 fs/super.c:797
 vfs_get_super fs/super.c:1333 [inline]
 get_tree_nodev+0x48/0x340 fs/super.c:1357
 mqueue_get_tree+0xff/0x1c0 ipc/mqueue.c:435
 vfs_get_tree+0xa5/0x520 fs/super.c:1771
 fc_mount+0x33/0x110 fs/namespace.c:1114
 mq_create_mount ipc/mqueue.c:485 [inline]
 mq_init_ns+0x51c/0x760 ipc/mqueue.c:1700
 create_ipc_ns ipc/namespace.c:73 [inline]
 copy_ipcs+0x4b3/0xa40 ipc/namespace.c:112
 create_new_namespaces+0x3ad/0xdb0 kernel/nsproxy.c:90
 unshare_nsproxy_namespaces+0x17a/0x2b0 kernel/nsproxy.c:228
 ksys_unshare+0x8fa/0x1340 kernel/fork.c:3433
 __do_sys_unshare kernel/fork.c:3504 [inline]
 __se_sys_unshare kernel/fork.c:3502 [inline]
 __x64_sys_unshare+0x48/0x70 kernel/fork.c:3502
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

Uninit was created at:
 slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768
 slab_alloc_node mm/slub.c:3478 [inline]
 __kmem_cache_alloc_node+0x5c9/0x970 mm/slub.c:3517
 __do_kmalloc_node mm/slab_common.c:1006 [inline]
 __kmalloc_node+0x11c/0x3c0 mm/slab_common.c:1014
 kmalloc_node include/linux/slab.h:620 [inline]
 kvmalloc_node+0xc0/0x2d0 mm/util.c:617
 expand_one_shrinker_info mm/shrinker.c:129 [inline]
 expand_shrinker_info mm/shrinker.c:165 [inline]
 shrinker_memcg_alloc mm/shrinker.c:227 [inline]
 shrinker_alloc+0x606/0x1100 mm/shrinker.c:697
 alloc_super+0x9a6/0xf00 fs/super.c:386
 sget_fc+0x36b/0xf80 fs/super.c:797
 vfs_get_super fs/super.c:1333 [inline]
 get_tree_nodev+0x48/0x340 fs/super.c:1357
 mqueue_get_tree+0xff/0x1c0 ipc/mqueue.c:435
 vfs_get_tree+0xa5/0x520 fs/super.c:1771
 fc_mount+0x33/0x110 fs/namespace.c:1114
 mq_create_mount ipc/mqueue.c:485 [inline]
 mq_init_ns+0x51c/0x760 ipc/mqueue.c:1700
 create_ipc_ns ipc/namespace.c:73 [inline]
 copy_ipcs+0x4b3/0xa40 ipc/namespace.c:112
 create_new_namespaces+0x3ad/0xdb0 kernel/nsproxy.c:90
 unshare_nsproxy_namespaces+0x17a/0x2b0 kernel/nsproxy.c:228
 ksys_unshare+0x8fa/0x1340 kernel/fork.c:3433
 __do_sys_unshare kernel/fork.c:3504 [inline]
 __se_sys_unshare kernel/fork.c:3502 [inline]
 __x64_sys_unshare+0x48/0x70 kernel/fork.c:3502
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

CPU: 1 PID: 5127 Comm: syz-executor.1 Not tainted 6.7.0-rc2-syzkaller-00265-gd2da77f431ac #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
=====================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/27 10:28 upstream d2da77f431ac 5b429f39 .config console log report syz [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in shrinker_alloc
2023/11/27 08:33 upstream d2da77f431ac 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in shrinker_alloc
* Struck through repros no longer work on HEAD.