================================================================== BUG: KMSAN: kernel-infoleak in copyout+0x16b/0x1f0 lib/iov_iter.c:144 CPU: 1 PID: 10484 Comm: blkid Not tainted 5.1.0-rc7+ #5 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:619 kmsan_internal_check_memory+0x974/0xa80 mm/kmsan/kmsan.c:713 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:492 copyout+0x16b/0x1f0 lib/iov_iter.c:144 copy_page_to_iter_iovec lib/iov_iter.c:216 [inline] copy_page_to_iter+0x654/0x1910 lib/iov_iter.c:905 generic_file_buffered_read mm/filemap.c:2206 [inline] generic_file_read_iter+0x2979/0x3e70 mm/filemap.c:2386 blkdev_read_iter+0x20d/0x270 fs/block_dev.c:1986 call_read_iter include/linux/fs.h:1860 [inline] new_sync_read fs/read_write.c:406 [inline] __vfs_read+0x9af/0xbe0 fs/read_write.c:418 vfs_read+0x359/0x6f0 fs/read_write.c:452 ksys_read+0x1c5/0x440 fs/read_write.c:579 __do_sys_read fs/read_write.c:589 [inline] __se_sys_read+0x92/0xb0 fs/read_write.c:587 __x64_sys_read+0x4a/0x70 fs/read_write.c:587 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x7fe32cb79310 Code: 73 01 c3 48 8b 0d 28 4b 2b 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 83 3d e5 a2 2b 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 6e 8a 01 00 48 89 04 24 RSP: 002b:00007ffcb215f368 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fe32cb79310 RDX: 0000000000000100 RSI: 0000000002216df8 RDI: 0000000000000003 RBP: 0000000002216dd0 R08: 0000000000000028 R09: 0000000001680000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000002216030 R13: 0000000000000100 R14: 0000000002216080 R15: 0000000002216de8 Uninit was created at: kmsan_save_stack_with_flags+0x7a/0x130 mm/kmsan/kmsan.c:205 kmsan_internal_alloc_meta_for_pages+0x10f/0x500 mm/kmsan/kmsan_hooks.c:99 kmsan_alloc_page+0x7a/0xf0 mm/kmsan/kmsan_hooks.c:243 __alloc_pages_nodemask+0x143d/0x5e90 mm/page_alloc.c:4655 alloc_pages_current+0x6a0/0x9b0 mm/mempolicy.c:2132 alloc_pages include/linux/gfp.h:511 [inline] __page_cache_alloc+0x95/0x320 mm/filemap.c:948 pagecache_get_page+0x443/0x11f0 mm/filemap.c:1644 filemap_fault+0x2705/0x2cd0 mm/filemap.c:2595 __do_fault mm/memory.c:3042 [inline] do_read_fault mm/memory.c:3452 [inline] do_fault mm/memory.c:3581 [inline] handle_pte_fault mm/memory.c:3812 [inline] __handle_mm_fault mm/memory.c:3936 [inline] handle_mm_fault+0x76fe/0x9fa0 mm/memory.c:3973 faultin_page mm/gup.c:549 [inline] __get_user_pages+0x18c4/0x26c0 mm/gup.c:752 populate_vma_page_range mm/gup.c:1410 [inline] __mm_populate+0x679/0x870 mm/gup.c:1458 mm_populate include/linux/mm.h:2357 [inline] vm_mmap_pgoff+0x3de/0x440 mm/util.c:367 ksys_mmap_pgoff+0xa5b/0xb00 mm/mmap.c:1610 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap+0x172/0x1a0 arch/x86/kernel/sys_x86_64.c:91 __x64_sys_mmap+0x69/0x90 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Bytes 0-255 of 256 are uninitialized Memory access of size 256 starts at ffff88802a301000 Data copied to user address 0000000002216df8 ==================================================================