===================================================== BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:257 CPU: 1 PID: 13760 Comm: syz-executor429 Not tainted 5.4.0-rc8-syzkaller #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+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108 kmsan_internal_check_memory+0x178/0x440 mm/kmsan/kmsan.c:435 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:257 copyout+0x16b/0x1f0 lib/iov_iter.c:145 _copy_to_iter+0x35f/0x26f0 lib/iov_iter.c:616 copy_to_iter include/linux/uio.h:138 [inline] simple_copy_to_iter+0x92/0xb0 net/core/datagram.c:515 __skb_datagram_iter+0x24d/0xee0 net/core/datagram.c:423 skb_copy_datagram_iter+0x29c/0x2b0 net/core/datagram.c:529 tun_put_user drivers/net/tun.c:2144 [inline] tun_do_read+0x2522/0x2eb0 drivers/net/tun.c:2228 tun_chr_read_iter+0x229/0x460 drivers/net/tun.c:2247 call_read_iter include/linux/fs.h:1889 [inline] new_sync_read fs/read_write.c:414 [inline] __vfs_read+0xa67/0xc90 fs/read_write.c:427 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+0x44/0xa9 RIP: 0033:0x402ac0 Code: 01 f0 ff ff 0f 83 a0 0d 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d ed 94 2d 00 00 75 14 b8 00 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 74 0d 00 00 c3 48 83 ec 08 e8 da 02 00 00 RSP: 002b:00007ffea4697538 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000402ac0 RDX: 00000000000003e8 RSI: 00007ffea4697540 RDI: 00000000000000f0 RBP: 000000000001db88 R08: 0000000000000000 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000403d50 R14: 0000000000000000 R15: 0000000000000000 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:149 [inline] kmsan_internal_chain_origin+0xb9/0x170 mm/kmsan/kmsan.c:317 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:252 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:272 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 pskb_expand_head+0x38a/0x19f0 net/core/skbuff.c:1637 __skb_cow include/linux/skbuff.h:3118 [inline] skb_cow_head include/linux/skbuff.h:3152 [inline] batadv_skb_head_push+0x23c/0x360 net/batman-adv/soft-interface.c:75 batadv_send_skb_packet+0x1a7/0x8c0 net/batman-adv/send.c:86 batadv_send_broadcast_skb+0x76/0x90 net/batman-adv/send.c:127 batadv_iv_ogm_send_to_if net/batman-adv/bat_iv_ogm.c:393 [inline] batadv_iv_ogm_emit net/batman-adv/bat_iv_ogm.c:419 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x993/0xd50 net/batman-adv/bat_iv_ogm.c:1706 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 kthread+0x4b5/0x4f0 kernel/kthread.c:256 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:353 Uninit was created at: kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:149 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:362 [inline] kmsan_alloc_page+0x140/0x330 mm/kmsan/kmsan_shadow.c:391 __alloc_pages_nodemask+0x1421/0x5fd0 mm/page_alloc.c:4799 __alloc_pages include/linux/gfp.h:498 [inline] __alloc_pages_node include/linux/gfp.h:511 [inline] alloc_pages_node include/linux/gfp.h:525 [inline] __page_frag_cache_refill mm/page_alloc.c:4874 [inline] page_frag_alloc+0x3ae/0x910 mm/page_alloc.c:4904 __netdev_alloc_skb+0x672/0xb20 net/core/skbuff.c:455 __netdev_alloc_skb_ip_align include/linux/skbuff.h:2799 [inline] netdev_alloc_skb_ip_align include/linux/skbuff.h:2809 [inline] batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:558 [inline] batadv_iv_ogm_queue_add+0xf42/0x17b0 net/batman-adv/bat_iv_ogm.c:670 batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:845 [inline] batadv_iv_ogm_schedule+0xe93/0x1080 net/batman-adv/bat_iv_ogm.c:865 batadv_iv_send_outstanding_bat_ogm_packet+0xbc0/0xd50 net/batman-adv/bat_iv_ogm.c:1718 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 kthread+0x4b5/0x4f0 kernel/kthread.c:256 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:353 Bytes 52-53 of 122 are uninitialized Memory access of size 122 starts at ffff9145b54db440 Data copied to user address 00007ffea4697540 =====================================================