1 TITLE: KMSAN: use of uninitialized memory in show_trace_log_lvl 2 3 [ 46.514273] ================================================================== 4 [ 46.521639] BUG: KMSAN: use of uninitialized memory in show_trace_log_lvl+0xda4/0x1030 5 [ 46.529696] CPU: 1 PID: 4975 Comm: syz-executor1 Not tainted 4.16.0-rc4+ #60 6 [ 46.536872] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 7 [ 46.546219] Call Trace: 8 [ 46.548805] dump_stack+0x14a/0x1d0 9 [ 46.552421] ? show_trace_log_lvl+0xda4/0x1030 10 [ 46.556997] kmsan_report+0x142/0x1f0 11 [ 46.560792] __msan_warning_32+0x6c/0xb0 12 [ 46.564842] show_trace_log_lvl+0xda4/0x1030 13 [ 46.569230] ? sock_common_setsockopt+0x137/0x170 14 [ 46.574060] ? tcp_disconnect+0x15d0/0x15d0 15 [ 46.578366] show_stack+0xfc/0x150 16 [ 46.581883] ? print_worker_info+0x1b4/0x670 17 [ 46.586286] dump_stack+0x185/0x1d0 18 [ 46.589915] warn_alloc+0x401/0x660 19 [ 46.593560] ? __vmalloc_node_range+0xed/0x1120 20 [ 46.598226] __vmalloc_node_range+0xa59/0x1120 21 [ 46.602818] __vmalloc_node_flags_caller+0x102/0x120 22 [ 46.607923] ? xt_alloc_entry_offsets+0x62/0x70 23 [ 46.612593] ? xt_alloc_entry_offsets+0x62/0x70 24 [ 46.617265] kvmalloc_node+0x2aa/0x2e0 25 [ 46.621158] xt_alloc_entry_offsets+0x62/0x70 26 [ 46.625655] translate_table+0x21b/0x3890 27 [ 46.629807] ? __kmalloc_node+0x105b/0x1290 28 [ 46.634130] ? kvmalloc_node+0x1a5/0x2e0 29 [ 46.638197] ? selinux_capable+0xd6/0xf0 30 [ 46.642264] ? kmsan_set_origin+0x9e/0x160 31 [ 46.646500] ? kmsan_internal_unpoison_shadow+0x83/0xe0 32 [ 46.651869] do_ip6t_set_ctl+0x60e/0x930 33 [ 46.656021] ? cleanup_entry+0x5c0/0x5c0 34 [ 46.660082] nf_setsockopt+0x476/0x4d0 35 [ 46.663973] ipv6_setsockopt+0x1e8/0x360 36 [ 46.668038] ? ipv6_update_options+0x510/0x510 37 [ 46.672617] tcp_setsockopt+0x1bb/0x1f0 38 [ 46.676589] ? tcp_disconnect+0x15d0/0x15d0 39 [ 46.680909] sock_common_setsockopt+0x137/0x170 40 [ 46.685575] ? sock_common_recvmsg+0x270/0x270 41 [ 46.690154] SYSC_setsockopt+0x405/0x570 42 [ 46.694219] SyS_setsockopt+0x76/0xa0 43 [ 46.698014] do_syscall_64+0x2f1/0x450 44 [ 46.701899] ? SYSC_recv+0xe0/0xe0 45 [ 46.705443] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 46 [ 46.710628] RIP: 0033:0x453e69 47 [ 46.713809] RSP: 002b:00007fae2c76ec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 48 [ 46.721512] RAX: ffffffffffffffda RBX: 00007fae2c76f6d4 RCX: 0000000000453e69 49 [ 46.728776] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000013 50 [ 46.736039] RBP: 000000000072bea0 R08: 0000000000000004 R09: 0000000000000000 51 [ 46.743306] R10: 0000000020001fde R11: 0000000000000246 R12: 00000000ffffffff 52 [ 46.750564] R13: 0000000000000520 R14: 00000000006f7ba0 R15: 0000000000000000 53 [ 46.757817] chained origin: 54 [ 46.760739] kmsan_internal_chain_origin+0x12d/0x210 55 [ 46.765822] __msan_chain_origin+0x69/0xc0 56 [ 46.770042] update_stack_state+0x9de/0xa30 57 [ 46.774345] unwind_next_frame+0x607/0xe40 58 [ 46.778562] show_trace_log_lvl+0xb48/0x1030 59 [ 46.782948] show_stack+0xfc/0x150 60 [ 46.786468] dump_stack+0x185/0x1d0 61 [ 46.790080] warn_alloc+0x401/0x660 62 [ 46.793684] __vmalloc_node_range+0xa59/0x1120 63 [ 46.798252] __vmalloc_node_flags_caller+0x102/0x120 64 [ 46.803333] kvmalloc_node+0x2aa/0x2e0 65 [ 46.807202] xt_alloc_entry_offsets+0x62/0x70 66 [ 46.811683] translate_table+0x21b/0x3890 67 [ 46.815808] do_ip6t_set_ctl+0x60e/0x930 68 [ 46.819849] nf_setsockopt+0x476/0x4d0 69 [ 46.823716] ipv6_setsockopt+0x1e8/0x360 70 [ 46.827754] tcp_setsockopt+0x1bb/0x1f0 71 [ 46.831706] sock_common_setsockopt+0x137/0x170 72 [ 46.836354] SYSC_setsockopt+0x405/0x570 73 [ 46.840391] SyS_setsockopt+0x76/0xa0 74 [ 46.844170] do_syscall_64+0x2f1/0x450 75 [ 46.848043] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 76 [ 46.853204] origin description: ----ad.i@selinux_socket_setsockopt 77 [ 46.859492] local variable created at: 78 [ 46.863362] selinux_socket_setsockopt+0x73/0x3b0 79 [ 46.868181] security_socket_setsockopt+0x130/0x210 80 [ 46.873171] ================================================================== 81