================================================================== BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 CPU: 0 PID: 12341 Comm: rsyslogd Not tainted 5.3.0-rc3+ #16 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+0x162/0x2d0 mm/kmsan/kmsan_report.c:109 kmsan_internal_check_memory+0x455/0x8d0 mm/kmsan/kmsan.c:522 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:493 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 copy_to_user include/linux/uaccess.h:174 [inline] syslog_print kernel/printk/printk.c:1406 [inline] do_syslog+0x2e62/0x3160 kernel/printk/printk.c:1531 kmsg_read+0x142/0x1a0 fs/proc/kmsg.c:40 proc_reg_read+0x25f/0x360 fs/proc/inode.c:223 __vfs_read+0x1a9/0xc90 fs/read_write.c:425 vfs_read+0x359/0x6f0 fs/read_write.c:461 ksys_read+0x265/0x430 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read+0x92/0xb0 fs/read_write.c:595 __x64_sys_read+0x4a/0x70 fs/read_write.c:595 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x7f685f9c01fd Code: d1 20 00 00 75 10 b8 00 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e fa ff ff 48 89 04 24 b8 00 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 a7 fa ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f685cf5fe30 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000f5a4b0 RCX: 00007f685f9c01fd RDX: 0000000000000fff RSI: 00007f685e7945a0 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000f45260 R09: 0000000004000001 R10: 0000000000000001 R11: 0000000000000293 R12: 000000000065e420 R13: 00007f685cf609c0 R14: 00007f6860005040 R15: 0000000000000003 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 kmsan_memcpy_memmove_metadata+0x819/0xa80 mm/kmsan/kmsan.c:278 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:298 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 msg_print_text+0x871/0xa70 kernel/printk/printk.c:1338 syslog_print kernel/printk/printk.c:1387 [inline] do_syslog+0x2a3f/0x3160 kernel/printk/printk.c:1531 kmsg_read+0x142/0x1a0 fs/proc/kmsg.c:40 proc_reg_read+0x25f/0x360 fs/proc/inode.c:223 __vfs_read+0x1a9/0xc90 fs/read_write.c:425 vfs_read+0x359/0x6f0 fs/read_write.c:461 ksys_read+0x265/0x430 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read+0x92/0xb0 fs/read_write.c:595 __x64_sys_read+0x4a/0x70 fs/read_write.c:595 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 kmsan_memcpy_memmove_metadata+0x819/0xa80 mm/kmsan/kmsan.c:278 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:298 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 log_store+0xe7e/0x14d0 kernel/printk/printk.c:639 log_output kernel/printk/printk.c:1901 [inline] vprintk_store+0xbf7/0x11d0 kernel/printk/printk.c:1952 vprintk_emit+0x2d9/0x8a0 kernel/printk/printk.c:1980 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2025 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2058 tipc_enable_bearer net/tipc/bearer.c:339 [inline] __tipc_nl_bearer_enable+0x16f7/0x1c80 net/tipc/bearer.c:899 tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:907 genl_family_rcv_msg net/netlink/genetlink.c:629 [inline] genl_rcv_msg+0x16c5/0x1f20 net/netlink/genetlink.c:654 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf6c/0x1050 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmsg net/socket.c:2356 [inline] __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2363 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190 string_nocheck lib/vsprintf.c:609 [inline] string+0x530/0x600 lib/vsprintf.c:668 vsnprintf+0x218f/0x3210 lib/vsprintf.c:2503 vscnprintf+0xc2/0x180 lib/vsprintf.c:2606 vprintk_store+0xef/0x11d0 kernel/printk/printk.c:1919 vprintk_emit+0x2d9/0x8a0 kernel/printk/printk.c:1980 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2025 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2058 tipc_enable_bearer net/tipc/bearer.c:339 [inline] __tipc_nl_bearer_enable+0x16f7/0x1c80 net/tipc/bearer.c:899 tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:907 genl_family_rcv_msg net/netlink/genetlink.c:629 [inline] genl_rcv_msg+0x16c5/0x1f20 net/netlink/genetlink.c:654 netlink_rcv_skb+0x431/0x620 net/netlink/af_netlink.c:2477 genl_rcv+0x63/0x80 net/netlink/genetlink.c:665 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf6c/0x1050 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x110f/0x1330 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmsg net/socket.c:2356 [inline] __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2363 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_poison_shadow+0x53/0xa0 mm/kmsan/kmsan.c:146 kmsan_slab_alloc+0xaa/0x120 mm/kmsan/kmsan_hooks.c:175 slab_alloc_node mm/slub.c:2790 [inline] __kmalloc_node_track_caller+0xb55/0x1320 mm/slub.c:4388 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x306/0xa10 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1056 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline] netlink_sendmsg+0x783/0x1330 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg net/socket.c:657 [inline] ___sys_sendmsg+0x14ff/0x1590 net/socket.c:2311 __sys_sendmsg net/socket.c:2356 [inline] __do_sys_sendmsg net/socket.c:2365 [inline] __se_sys_sendmsg+0x305/0x460 net/socket.c:2363 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2363 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Bytes 78-79 of 105 are uninitialized Memory access of size 105 starts at ffff888123979000 Data copied to user address 00007f685e79460b ==================================================================