RDX: 00000001000001d8 RSI: 00000000200000c0 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000007b1 R14: 0000000000700938 R15: 0000000000000004 ================================================================== BUG: KMSAN: uninit-value in _copy_to_user+0x12f/0x180 lib/usercopy.c:26 CPU: 1 PID: 4364 Comm: rsyslogd Not tainted 4.17.0-rc5+ #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+0x185/0x1d0 lib/dump_stack.c:113 kmsan_report+0x149/0x260 mm/kmsan/kmsan.c:1084 __msan_warning_32+0x6e/0xc0 mm/kmsan/kmsan_instr.c:685 _copy_to_user+0x12f/0x180 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:183 [inline] syslog_print kernel/printk/printk.c:1344 [inline] do_syslog+0x3936/0x3c20 kernel/printk/printk.c:1467 kmsg_read+0x142/0x1a0 fs/proc/kmsg.c:40 proc_reg_read+0x1e3/0x2f0 fs/proc/inode.c:230 __vfs_read+0x1b2/0x9d0 fs/read_write.c:416 vfs_read+0x36c/0x6b0 fs/read_write.c:452 ksys_read fs/read_write.c:578 [inline] __do_sys_read fs/read_write.c:588 [inline] __se_sys_read fs/read_write.c:586 [inline] __x64_sys_read+0x1bf/0x3e0 fs/read_write.c:586 do_syscall_64+0x15b/0x230 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7faa385dd1fd RSP: 002b:00007faa35b7ce30 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00000000006de670 RCX: 00007faa385dd1fd RDX: 0000000000000fff RSI: 00007faa373b15a0 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00000000006c9260 R09: 0000000000000000 R10: 0000000000000011 R11: 0000000000000293 R12: 000000000065e420 R13: 00007faa35b7d9c0 R14: 00007faa38c22040 R15: 0000000000000003 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:279 [inline] kmsan_save_stack mm/kmsan/kmsan.c:294 [inline] kmsan_internal_chain_origin+0x12b/0x210 mm/kmsan/kmsan.c:685 __msan_chain_origin+0x69/0xc0 mm/kmsan/kmsan_instr.c:529 log_store+0x13fc/0x14b0 kernel/printk/printk.c:641 log_output kernel/printk/printk.c:1832 [inline] vprintk_emit+0xca5/0x1060 kernel/printk/printk.c:1897 vprintk_default+0x90/0xa0 kernel/printk/printk.c:1955 vprintk_func+0x517/0x700 kernel/printk/printk_safe.c:379 printk+0x1b6/0x1f0 kernel/printk/printk.c:1991 printk_stack_address arch/x86/kernel/dumpstack.c:69 [inline] show_trace_log_lvl+0xb5c/0x10a0 arch/x86/kernel/dumpstack.c:205 show_stack+0xfc/0x150 arch/x86/kernel/dumpstack.c:241 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x185/0x1d0 lib/dump_stack.c:113 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x87b/0xab0 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:3089 [inline] prepare_alloc_pages mm/page_alloc.c:4329 [inline] __alloc_pages_nodemask+0x600/0x5cc0 mm/page_alloc.c:4365 alloc_pages_current+0x6b1/0x970 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:494 [inline] __get_free_pages+0x2d/0xc0 mm/page_alloc.c:4423 tlb_next_batch mm/memory.c:204 [inline] __tlb_remove_page_size mm/memory.c:316 [inline] __tlb_remove_page include/asm-generic/tlb.h:150 [inline] zap_pte_range mm/memory.c:1340 [inline] zap_pmd_range mm/memory.c:1441 [inline] zap_pud_range mm/memory.c:1470 [inline] zap_p4d_range mm/memory.c:1491 [inline] unmap_page_range+0x26d2/0x3be0 mm/memory.c:1512 unmap_single_vma+0x445/0x5e0 mm/memory.c:1557 unmap_vmas+0x1f4/0x360 mm/memory.c:1587 exit_mmap+0x4d7/0x980 mm/mmap.c:3105 __mmput+0x158/0x600 kernel/fork.c:962 mmput+0xab/0xf0 kernel/fork.c:983 exit_mm+0x6ed/0x7a0 kernel/exit.c:545 do_exit+0xc12/0x3930 kernel/exit.c:854 do_group_exit+0x1a0/0x360 kernel/exit.c:970 get_signal+0x1405/0x1ec0 kernel/signal.c:2482 do_signal+0xb8/0x1d20 arch/x86/kernel/signal.c:810 exit_to_usermode_loop arch/x86/entry/common.c:162 [inline] prepare_exit_to_usermode+0x271/0x3a0 arch/x86/entry/common.c:196 syscall_return_slowpath+0xe9/0x710 arch/x86/entry/common.c:265 do_syscall_64+0x1ad/0x230 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Local variable description: ----info.i.i@get_signal Variable was created at: get_signal+0x6f/0x1ec0 kernel/signal.c:2306 do_signal+0xb8/0x1d20 arch/x86/kernel/signal.c:810 ==================================================================