===================================================== BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:33 CPU: 0 PID: 11395 Comm: rsyslogd Not tainted 5.4.0-rc2+ #0 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+0x153/0x2c0 mm/kmsan/kmsan_report.c:113 kmsan_internal_check_memory+0x187/0x4c0 mm/kmsan/kmsan.c:449 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:268 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:33 copy_to_user include/linux/uaccess.h:174 [inline] syslog_print kernel/printk/printk.c:1416 [inline] do_syslog+0x2e62/0x3160 kernel/printk/printk.c:1541 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+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x7fe6395b91fd 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:00007fe636b58e30 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00000000023fe4b0 RCX: 00007fe6395b91fd RDX: 0000000000000fff RSI: 00007fe63838d5a0 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00000000023e9260 R09: 0000000004000001 R10: 0000000000000001 R11: 0000000000000293 R12: 000000000065e420 R13: 00007fe636b599c0 R14: 00007fe639bfe040 R15: 0000000000000003 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_chain_origin+0xde/0x190 mm/kmsan/kmsan.c:329 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:255 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:275 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 msg_print_text+0x871/0xa70 kernel/printk/printk.c:1348 syslog_print kernel/printk/printk.c:1397 [inline] do_syslog+0x2a3f/0x3160 kernel/printk/printk.c:1541 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+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_chain_origin+0xde/0x190 mm/kmsan/kmsan.c:329 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:255 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:275 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 log_store+0xe7e/0x14d0 kernel/printk/printk.c:649 log_output kernel/printk/printk.c:1911 [inline] vprintk_store+0xc0c/0x11e0 kernel/printk/printk.c:1966 vprintk_emit+0x313/0x8f0 kernel/printk/printk.c:1995 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2040 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2073 tipc_enable_bearer net/tipc/bearer.c:339 [inline] __tipc_nl_bearer_enable+0x16f7/0x1c80 net/tipc/bearer.c:963 tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:971 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+0xf3e/0x1020 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+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_chain_origin+0xde/0x190 mm/kmsan/kmsan.c:329 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:184 string_nocheck lib/vsprintf.c:609 [inline] string+0x530/0x600 lib/vsprintf.c:668 vsnprintf+0x218f/0x3210 lib/vsprintf.c:2510 vscnprintf+0xc2/0x180 lib/vsprintf.c:2613 vprintk_store+0xef/0x11e0 kernel/printk/printk.c:1933 vprintk_emit+0x313/0x8f0 kernel/printk/printk.c:1995 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2040 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2073 tipc_enable_bearer net/tipc/bearer.c:339 [inline] __tipc_nl_bearer_enable+0x16f7/0x1c80 net/tipc/bearer.c:963 tipc_nl_bearer_enable+0x6c/0xb0 net/tipc/bearer.c:971 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+0xf3e/0x1020 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+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline] kmsan_internal_poison_shadow+0x60/0x120 mm/kmsan/kmsan.c:137 kmsan_slab_alloc+0xaa/0x120 mm/kmsan/kmsan_hooks.c:103 slab_alloc_node mm/slub.c:2792 [inline] __kmalloc_node_track_caller+0xb55/0x1320 mm/slub.c:4390 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x306/0xa10 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1050 [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+0xb6/0x160 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Bytes 78-79 of 105 are uninitialized Memory access of size 105 starts at ffff888034450000 Data copied to user address 00007fe63838d5a0 =====================================================