syzbot


KMSAN: uninit-value in mem_cgroup_try_charge

Status: closed as invalid on 2021/12/14 11:52
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1276d, last: 1276d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in task_css include/linux/cgroup.h:480 [inline]
BUG: KMSAN: uninit-value in mem_cgroup_from_task mm/memcontrol.c:822 [inline]
BUG: KMSAN: uninit-value in get_mem_cgroup_from_mm mm/memcontrol.c:851 [inline]
BUG: KMSAN: uninit-value in mem_cgroup_try_charge+0x8dd/0xe30 mm/memcontrol.c:5932
CPU: 0 PID: 28212 Comm: syz-executor328 Not tainted 5.1.0+ #1
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:622
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310
 task_css include/linux/cgroup.h:480 [inline]
 mem_cgroup_from_task mm/memcontrol.c:822 [inline]
 get_mem_cgroup_from_mm mm/memcontrol.c:851 [inline]
 mem_cgroup_try_charge+0x8dd/0xe30 mm/memcontrol.c:5932
 mcopy_atomic_pte mm/userfaultfd.c:71 [inline]
 mfill_atomic_pte mm/userfaultfd.c:418 [inline]
 __mcopy_atomic mm/userfaultfd.c:559 [inline]
 mcopy_atomic+0x130c/0x3f60 mm/userfaultfd.c:609
 userfaultfd_copy fs/userfaultfd.c:1722 [inline]
 userfaultfd_ioctl+0x5028/0x6a20 fs/userfaultfd.c:1868
 do_vfs_ioctl+0xea8/0x2c50 fs/ioctl.c:46
 ksys_ioctl fs/ioctl.c:713 [inline]
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x4471c9
Code: e8 4c bb 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f96c1f9adb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dcc38 RCX: 00000000004471c9
RDX: 0000000020000100 RSI: 00000000c028aa03 RDI: 0000000000000004
RBP: 00000000006dcc30 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc3c
R13: 00007fff3f0ad05f R14: 00007f96c1f9b9c0 R15: 0000000000000006

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:208 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:162
 kmsan_kmalloc+0xa4/0x130 mm/kmsan/kmsan_hooks.c:175
 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:184
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc_node mm/slub.c:2771 [inline]
 kmem_cache_alloc_node+0x9f2/0xbe0 mm/slub.c:2811
 alloc_task_struct_node kernel/fork.c:158 [inline]
 dup_task_struct kernel/fork.c:845 [inline]
 copy_process+0x8fc/0xae30 kernel/fork.c:1754
 _do_fork+0x327/0xf40 kernel/fork.c:2228
 __do_sys_clone kernel/fork.c:2335 [inline]
 __se_sys_clone+0xf6/0x110 kernel/fork.c:2329
 __x64_sys_clone+0x62/0x80 kernel/fork.c:2329
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2019/06/05 17:28 https://github.com/google/kmsan.git master f75e4cfea97f bfb4a51e .config log report syz C
* Struck through repros no longer work on HEAD.