INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-next-kasan-gce-7,10.128.0.58' (ECDSA) to the list of known hosts. net.ipv6.conf.syz0.accept_dad = 0 net.ipv6.conf.syz0.router_solicitations = 0 executing program syzkaller login: [ 30.936972] ================================================================== [ 30.938134] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 30.939081] Read of size 4 at addr ffff8801ccd567a8 by task syzkaller070994/3012 [ 30.940069] [ 30.940310] CPU: 0 PID: 3012 Comm: syzkaller070994 Not tainted 4.14.0-rc2-next-20170928+ #31 [ 30.941513] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.942736] Call Trace: [ 30.943114] dump_stack+0x194/0x257 [ 30.943611] ? arch_local_irq_restore+0x53/0x53 [ 30.944240] ? show_regs_print_info+0x65/0x65 [ 30.944850] ? lock_release+0xd70/0xd70 [ 30.945394] ? xfrm_state_find+0x305b/0x3190 [ 30.945990] print_address_description+0x73/0x250 [ 30.946640] ? xfrm_state_find+0x305b/0x3190 [ 30.947261] kasan_report+0x25b/0x340 [ 30.947818] __asan_report_load4_noabort+0x14/0x20 [ 30.948496] xfrm_state_find+0x305b/0x3190 [ 30.949100] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 30.949782] ? print_usage_bug+0x480/0x480 [ 30.950375] ? __lock_acquire+0x732/0x4620 [ 30.950961] ? __lock_acquire+0x732/0x4620 [ 30.951534] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 30.952234] ? __lock_acquire+0x732/0x4620 [ 30.952823] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 30.953539] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 30.954276] ? check_noncircular+0x20/0x20 [ 30.954885] ? check_noncircular+0x20/0x20 [ 30.955466] xfrm_tmpl_resolve+0x309/0xc00 [ 30.956076] ? __xfrm_decode_session+0x100/0x100 [ 30.956721] ? rcu_read_lock_sched_held+0x108/0x120 [ 30.959107] ? fib_table_lookup+0xa07/0x1a30 [ 30.963492] ? check_noncircular+0x20/0x20 [ 30.967711] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 30.973156] ? xfrm_tmpl_resolve+0xc00/0xc00 [ 30.977542] ? lock_downgrade+0x990/0x990 [ 30.981673] ? xfrm_selector_match+0xe00/0xe00 [ 30.986227] ? rcu_read_lock_held+0xa9/0xc0 [ 30.990532] ? find_exception+0x3aa/0x520 [ 30.994654] ? lock_release+0xd70/0xd70 [ 30.998609] ? refcount_inc_not_zero+0xfe/0x180 [ 31.003257] ? xfrm_selector_match+0x3b/0xe00 [ 31.007738] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 31.012472] ? xfrm_selector_match+0xe00/0xe00 [ 31.017028] ? check_noncircular+0x20/0x20 [ 31.021254] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 31.026682] xfrm_lookup+0xf0a/0x2540 [ 31.030456] ? xfrm_lookup+0xf0a/0x2540 [ 31.034407] ? ip_route_input_noref+0x1e0/0x1e0 [ 31.039054] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 31.045436] ? find_held_lock+0x39/0x1d0 [ 31.049484] ? lock_downgrade+0x990/0x990 [ 31.053607] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 31.058775] ? ip_route_output_key_hash+0x1a6/0x370 [ 31.063769] ? lock_release+0xd70/0xd70 [ 31.068318] ? selinux_nf_register+0x30/0x30 [ 31.072702] ? __lock_acquire+0x732/0x4620 [ 31.076911] ? check_noncircular+0x20/0x20 [ 31.081123] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 31.086379] ? ip_route_output_key_hash+0x252/0x370 [ 31.091370] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 31.096890] xfrm_lookup_route+0x39/0x1a0 [ 31.101014] ip_route_output_flow+0x7c/0xa0 [ 31.105313] inet_csk_route_req+0x5d8/0x990 [ 31.109626] tcp_v4_send_synack+0x1e4/0x270 [ 31.113921] ? tcp_v4_send_check+0x90/0x90 [ 31.118137] ? prandom_u32_state+0x13/0x180 [ 31.122437] tcp_rtx_synack+0x119/0x2e0 [ 31.126387] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 31.131297] ? __lock_is_held+0xbc/0x140 [ 31.135346] inet_rtx_syn_ack+0x64/0xd0 [ 31.139306] tcp_check_req+0xae3/0x1620 [ 31.143260] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 31.147990] ? refcount_inc_not_zero+0xfe/0x180 [ 31.152630] ? refcount_add+0x60/0x60 [ 31.156403] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 31.161135] ? tcp_filter+0x111/0x160 [ 31.164914] tcp_v4_rcv+0x17ad/0x2f20 [ 31.168693] ? lock_acquire+0x1d5/0x580 [ 31.172655] ? tcp_v4_early_demux+0xa30/0xa30 [ 31.177134] ip_local_deliver_finish+0x2e2/0xba0 [ 31.181869] ? inet_del_offload+0x40/0x40 [ 31.185994] ? nf_hook_slow+0xd3/0x1a0 [ 31.189860] ip_local_deliver+0x1ce/0x6e0 [ 31.193986] ? ip_call_ra_chain+0x6d0/0x6d0 [ 31.198303] ? inet_del_offload+0x40/0x40 [ 31.202441] ip_rcv_finish+0x8db/0x19c0 [ 31.206398] ? ip_local_deliver_finish+0xba0/0xba0 [ 31.211308] ? iptable_nat_ipv4_fn+0x40/0x40 [ 31.215694] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 31.220178] ? ip_rcv+0xb90/0x17d0 [ 31.223696] ? tcp_v4_send_synack+0x270/0x270 [ 31.228167] ? nf_nat_ipv4_in+0x1cd/0x270 [ 31.232290] ? iptable_nat_ipv4_fn+0x40/0x40 [ 31.236683] ? nf_hook_slow+0xd3/0x1a0 [ 31.240553] ip_rcv+0xc3f/0x17d0 [ 31.243900] ? ip_local_deliver+0x6e0/0x6e0 [ 31.248198] ? __lock_acquire+0x732/0x4620 [ 31.252431] ? ip_local_deliver_finish+0xba0/0xba0 [ 31.257336] ? ip_local_deliver+0x6e0/0x6e0 [ 31.261643] __netif_receive_skb_core+0x19af/0x33d0 [ 31.266634] ? print_usage_bug+0x480/0x480 [ 31.270854] ? nf_ingress+0x9f0/0x9f0 [ 31.274626] ? kasan_kmalloc+0xad/0xe0 [ 31.278500] ? kmem_cache_alloc+0x12e/0x760 [ 31.282802] ? __build_skb+0x9d/0x450 [ 31.286581] ? build_skb+0x6f/0x260 [ 31.290183] ? tun_build_skb.isra.47+0x948/0x16e0 [ 31.294998] ? tun_get_user+0x1905/0x3610 [ 31.299119] ? tun_chr_write_iter+0xbf/0x160 [ 31.303499] ? __vfs_write+0x68a/0x970 [ 31.307363] ? __skb_flow_get_ports+0x151/0x400 [ 31.312008] ? skb_flow_dissector_init+0x280/0x280 [ 31.316915] ? check_noncircular+0x20/0x20 [ 31.321121] ? __skb_flow_get_ports+0x151/0x400 [ 31.325766] ? __skb_flow_dissect+0x85b/0x3bc0 [ 31.330341] ? find_held_lock+0x39/0x1d0 [ 31.334386] ? lock_downgrade+0x990/0x990 [ 31.338510] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.343674] ? lock_acquire+0x1d5/0x580 [ 31.347622] ? netif_receive_skb_internal+0x1d7/0x670 [ 31.352799] ? pvclock_read_flags+0x160/0x160 [ 31.357266] ? tun_build_skb.isra.47+0x443/0x16e0 [ 31.362095] ? lock_acquire+0x1d5/0x580 [ 31.366045] ? netif_receive_skb_internal+0xa2/0x670 [ 31.371125] ? ktime_get_with_offset+0x2c1/0x420 [ 31.375863] ? lock_release+0xd70/0xd70 [ 31.379828] ? ktime_get+0x3a0/0x3a0 [ 31.383518] ? skb_put+0x149/0x1c0 [ 31.387049] __netif_receive_skb+0x2c/0x1b0 [ 31.391351] ? __netif_receive_skb+0x2c/0x1b0 [ 31.395827] netif_receive_skb_internal+0x10b/0x670 [ 31.400818] ? dev_cpu_dead+0xb00/0xb00 [ 31.404779] ? rcu_pm_notify+0xc0/0xc0 [ 31.408653] netif_receive_skb+0xae/0x390 [ 31.412776] ? netif_receive_skb_internal+0x670/0x670 [ 31.417944] ? lock_downgrade+0x990/0x990 [ 31.422066] ? unwind_get_return_address+0x61/0xa0 [ 31.426982] ? tun_rx_batched.isra.49+0x5c3/0x860 [ 31.431817] tun_rx_batched.isra.49+0x5ed/0x860 [ 31.436485] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 31.441150] ? tun_sock_write_space+0x370/0x370 [ 31.445839] tun_get_user+0x2431/0x3610 [ 31.449792] ? check_noncircular+0x20/0x20 [ 31.454014] ? tun_build_skb.isra.47+0x16e0/0x16e0 [ 31.458936] ? lock_release+0xd70/0xd70 [ 31.462888] ? tun_chr_close+0x60/0x60 [ 31.466754] ? lock_release+0xd70/0xd70 [ 31.470704] ? __lock_is_held+0xbc/0x140 [ 31.474751] ? tun_get+0x1d4/0x2e0 [ 31.478263] ? tun_chr_close+0x60/0x60 [ 31.482138] tun_chr_write_iter+0xbf/0x160 [ 31.486349] __vfs_write+0x68a/0x970 [ 31.490038] ? kernel_read+0x120/0x120 [ 31.493905] ? _cond_resched+0x14/0x30 [ 31.497783] ? avc_policy_seqno+0x9/0x20 [ 31.501818] ? selinux_file_permission+0x82/0x460 [ 31.506645] ? rw_verify_area+0xe5/0x2b0 [ 31.510679] ? __fdget_raw+0x20/0x20 [ 31.514377] vfs_write+0x18f/0x510 [ 31.517893] SyS_write+0xef/0x220 [ 31.521323] ? SyS_read+0x220/0x220 [ 31.524920] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.529911] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.534646] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 31.539371] RIP: 0033:0x405b21 [ 31.542532] RSP: 002b:00007f230a1d6d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 31.550215] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b21 [ 31.557464] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 31.564706] RBP: 0000000000000086 R08: 0000000000000013 R09: 00007f230a1d7700 [ 31.571947] R10: 00007f230a1d79d0 R11: 0000000000000293 R12: 0000000000000000 [ 31.579195] R13: 00007fff0f4ee17f R14: 00007f230a1d79c0 R15: 0000000000000000 [ 31.586455] [ 31.588053] The buggy address belongs to the page: [ 31.592954] page:ffffea0007335580 count:0 mapcount:0 mapping: (null) index:0xffff8801ccd56200 [ 31.602370] flags: 0x200000000000000() [ 31.606228] raw: 0200000000000000 0000000000000000 ffff8801ccd56200 00000000ffffffff [ 31.614079] raw: dead000000000100 dead000000000200 ffff8801dae3e780 0000000000000000 [ 31.621927] page dumped because: kasan: bad access detected [ 31.627604] [ 31.629202] Memory state around the buggy address: [ 31.634099] ffff8801ccd56680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 31.641426] ffff8801ccd56700: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 [ 31.648756] >ffff8801ccd56780: 00 00 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 [ 31.656085] ^ [ 31.660725] ffff8801ccd56800: 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 [ 31.668057] ffff8801ccd56880: f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 [ 31.675383] ================================================================== [ 31.682712] Disabling lock debugging due to kernel taint [ 31.688163] Kernel panic - not syncing: panic_on_warn set ... [ 31.688163] [ 31.695495] CPU: 0 PID: 3012 Comm: syzkaller070994 Tainted: G B 4.14.0-rc2-next-20170928+ #31 [ 31.705250] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.714585] Call Trace: [ 31.717149] dump_stack+0x194/0x257 [ 31.720744] ? arch_local_irq_restore+0x53/0x53 [ 31.725389] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.730116] ? xfrm_state_find+0x2fa0/0x3190 [ 31.734495] panic+0x1e4/0x417 [ 31.737656] ? __warn+0x1d9/0x1d9 [ 31.741081] ? xfrm_state_find+0x305b/0x3190 [ 31.745461] kasan_end_report+0x50/0x50 [ 31.749400] kasan_report+0x144/0x340 [ 31.753169] __asan_report_load4_noabort+0x14/0x20 [ 31.758064] xfrm_state_find+0x305b/0x3190 [ 31.762278] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 31.767357] ? print_usage_bug+0x480/0x480 [ 31.771568] ? __lock_acquire+0x732/0x4620 [ 31.775775] ? __lock_acquire+0x732/0x4620 [ 31.779986] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.785144] ? __lock_acquire+0x732/0x4620 [ 31.789351] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.794511] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.799668] ? check_noncircular+0x20/0x20 [ 31.803867] ? check_noncircular+0x20/0x20 [ 31.808074] xfrm_tmpl_resolve+0x309/0xc00 [ 31.812284] ? __xfrm_decode_session+0x100/0x100 [ 31.817019] ? rcu_read_lock_sched_held+0x108/0x120 [ 31.822001] ? fib_table_lookup+0xa07/0x1a30 [ 31.826380] ? check_noncircular+0x20/0x20 [ 31.830585] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 31.836009] ? xfrm_tmpl_resolve+0xc00/0xc00 [ 31.840385] ? lock_downgrade+0x990/0x990 [ 31.844502] ? xfrm_selector_match+0xe00/0xe00 [ 31.849047] ? rcu_read_lock_held+0xa9/0xc0 [ 31.853334] ? find_exception+0x3aa/0x520 [ 31.857447] ? lock_release+0xd70/0xd70 [ 31.861392] ? refcount_inc_not_zero+0xfe/0x180 [ 31.866028] ? xfrm_selector_match+0x3b/0xe00 [ 31.870490] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 31.875213] ? xfrm_selector_match+0xe00/0xe00 [ 31.879761] ? check_noncircular+0x20/0x20 [ 31.883961] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 31.889385] xfrm_lookup+0xf0a/0x2540 [ 31.893151] ? xfrm_lookup+0xf0a/0x2540 [ 31.897092] ? ip_route_input_noref+0x1e0/0x1e0 [ 31.901741] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 31.908115] ? find_held_lock+0x39/0x1d0 [ 31.912146] ? lock_downgrade+0x990/0x990 [ 31.916273] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 31.921434] ? ip_route_output_key_hash+0x1a6/0x370 [ 31.926420] ? lock_release+0xd70/0xd70 [ 31.930359] ? selinux_nf_register+0x30/0x30 [ 31.934731] ? __lock_acquire+0x732/0x4620