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-mmots-kasan-gce-0,10.128.0.44' (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: [ 42.110341] ================================================================== [ 42.117807] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 42.124973] Read of size 4 at addr ffff8801cd7ce898 by task syzkaller714538/3017 [ 42.132484] [ 42.134090] CPU: 1 PID: 3017 Comm: syzkaller714538 Not tainted 4.13.0-mm1+ #5 [ 42.141333] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.150659] Call Trace: [ 42.153239] dump_stack+0x194/0x257 [ 42.156846] ? arch_local_irq_restore+0x53/0x53 [ 42.161488] ? show_regs_print_info+0x65/0x65 [ 42.165969] ? lock_release+0xd70/0xd70 [ 42.169917] ? print_usage_bug+0x480/0x480 [ 42.174127] ? xfrm_state_find+0x305b/0x3190 [ 42.178526] print_address_description+0x73/0x250 [ 42.183345] ? xfrm_state_find+0x305b/0x3190 [ 42.187728] kasan_report+0x24e/0x340 [ 42.191507] __asan_report_load4_noabort+0x14/0x20 [ 42.196410] xfrm_state_find+0x305b/0x3190 [ 42.200639] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 42.205725] ? print_usage_bug+0x480/0x480 [ 42.209939] ? check_noncircular+0x20/0x20 [ 42.214149] ? find_held_lock+0x39/0x1d0 [ 42.218188] ? check_noncircular+0x20/0x20 [ 42.222403] ? lock_downgrade+0x990/0x990 [ 42.226533] ? find_held_lock+0x39/0x1d0 [ 42.230576] ? __lock_acquire+0x732/0x4620 [ 42.234784] ? find_held_lock+0x39/0x1d0 [ 42.238835] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 42.244004] ? depot_save_stack+0x1c2/0x490 [ 42.248303] ? unwind_dump+0x4c0/0x4c0 [ 42.252168] ? do_raw_spin_trylock+0x190/0x190 [ 42.256738] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 42.260963] ? __xfrm_decode_session+0x100/0x100 [ 42.265693] ? save_stack_trace+0x16/0x20 [ 42.269811] ? save_stack+0x43/0xd0 [ 42.273411] ? kasan_kmalloc+0xad/0xe0 [ 42.277287] ? kasan_slab_alloc+0x12/0x20 [ 42.281416] ? kmem_cache_alloc+0x12e/0x760 [ 42.285716] ? dst_alloc+0x11f/0x1a0 [ 42.289402] ? rt_dst_alloc+0xe9/0x540 [ 42.293261] ? ip_route_output_key_hash+0x20b/0x370 [ 42.298261] ? ip_route_output_flow+0x26/0xa0 [ 42.302727] ? inet_csk_route_req+0x5d8/0x990 [ 42.307196] ? tcp_v4_send_synack+0x1e4/0x270 [ 42.311667] ? tcp_rtx_synack+0x119/0x2e0 [ 42.315786] ? inet_rtx_syn_ack+0x64/0xd0 [ 42.319908] ? tcp_check_req+0xaf5/0x1630 [ 42.324027] ? tcp_v4_rcv+0x1f57/0x2f20 [ 42.327974] ? ip_local_deliver_finish+0x2e2/0xba0 [ 42.332880] ? check_noncircular+0x20/0x20 [ 42.337087] ? __netif_receive_skb_core+0x19af/0x33d0 [ 42.342248] ? __netif_receive_skb+0x2c/0x1b0 [ 42.346713] ? netif_receive_skb_internal+0x10b/0x5e0 [ 42.351878] ? check_noncircular+0x20/0x20 [ 42.356089] ? tun_chr_write_iter+0xde/0x190 [ 42.360482] ? __vfs_write+0x68a/0x970 [ 42.364348] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 42.369777] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 42.375883] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 42.380286] ? lock_downgrade+0x990/0x990 [ 42.384414] ? dst_init+0x4d9/0x6a0 [ 42.388023] ? xfrm_selector_match+0xe00/0xe00 [ 42.392581] ? rcu_read_lock_held+0xa9/0xc0 [ 42.396882] ? lock_release+0xd70/0xd70 [ 42.400854] ? refcount_inc_not_zero+0xfe/0x180 [ 42.405507] ? xfrm_selector_match+0x3b/0xe00 [ 42.409982] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 42.414718] ? xfrm_selector_match+0xe00/0xe00 [ 42.419274] ? check_noncircular+0x20/0x20 [ 42.423483] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 42.428911] xfrm_lookup+0xf0a/0x2540 [ 42.432683] ? xfrm_lookup+0xf0a/0x2540 [ 42.436637] ? ip_route_input_noref+0x1e0/0x1e0 [ 42.441286] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 42.447668] ? find_held_lock+0x39/0x1d0 [ 42.451715] ? lock_downgrade+0x990/0x990 [ 42.455837] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 42.461025] ? ip_route_output_key_hash+0x1a6/0x370 [ 42.466023] ? lock_release+0xd70/0xd70 [ 42.469978] ? selinux_nf_register+0x30/0x30 [ 42.474362] ? __lock_acquire+0x732/0x4620 [ 42.478578] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 42.483834] ? ip_route_output_key_hash+0x252/0x370 [ 42.488827] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 42.494362] xfrm_lookup_route+0x39/0x1a0 [ 42.498489] ip_route_output_flow+0x7c/0xa0 [ 42.502789] inet_csk_route_req+0x5d8/0x990 [ 42.507092] tcp_v4_send_synack+0x1e4/0x270 [ 42.511390] ? tcp_v4_send_check+0x90/0x90 [ 42.515779] ? sk_filter_trim_cap+0x12f/0x9b0 [ 42.520248] ? prandom_u32_state+0x13/0x180 [ 42.524554] tcp_rtx_synack+0x119/0x2e0 [ 42.528508] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 42.533417] ? __lock_is_held+0xbc/0x140 [ 42.537475] inet_rtx_syn_ack+0x64/0xd0 [ 42.541428] tcp_check_req+0xaf5/0x1630 [ 42.545384] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 42.550203] ? refcount_inc_not_zero+0xfe/0x180 [ 42.554849] ? refcount_add+0x60/0x60 [ 42.558625] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 42.563361] ? tcp_filter+0x111/0x160 [ 42.567143] tcp_v4_rcv+0x1f57/0x2f20 [ 42.570931] ? lock_acquire+0x1d5/0x580 [ 42.574897] ? tcp_v4_early_demux+0xa30/0xa30 [ 42.579380] ip_local_deliver_finish+0x2e2/0xba0 [ 42.584126] ? inet_del_offload+0x40/0x40 [ 42.588250] ? nf_hook_slow+0xd3/0x1a0 [ 42.592116] ip_local_deliver+0x1ce/0x6e0 [ 42.596241] ? ip_call_ra_chain+0x6d0/0x6d0 [ 42.600548] ? inet_del_offload+0x40/0x40 [ 42.604696] ip_rcv_finish+0x8db/0x19c0 [ 42.608661] ? ip_local_deliver_finish+0xba0/0xba0 [ 42.613564] ? iptable_nat_ipv4_fn+0x40/0x40 [ 42.617949] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 42.622421] ? ip_rcv+0xbe0/0x17d0 [ 42.625939] ? find_held_lock+0x39/0x1d0 [ 42.629977] ? tcp_v4_send_synack+0x270/0x270 [ 42.634451] ? nf_nat_ipv4_in+0x1cd/0x270 [ 42.638570] ? iptable_nat_ipv4_fn+0x40/0x40 [ 42.642961] ? nf_hook_slow+0xd3/0x1a0 [ 42.646832] ip_rcv+0xc3f/0x17d0 [ 42.650197] ? ip_local_deliver+0x6e0/0x6e0 [ 42.654497] ? __lock_acquire+0x732/0x4620 [ 42.658718] ? ip_local_deliver_finish+0xba0/0xba0 [ 42.663627] ? ip_local_deliver+0x6e0/0x6e0 [ 42.667930] __netif_receive_skb_core+0x19af/0x33d0 [ 42.672923] ? print_usage_bug+0x480/0x480 [ 42.677143] ? nf_ingress+0x9f0/0x9f0 [ 42.680920] ? save_stack+0x43/0xd0 [ 42.684522] ? kasan_slab_alloc+0x12/0x20 [ 42.688650] ? kmem_cache_alloc+0x12e/0x760 [ 42.692946] ? __build_skb+0x9d/0x450 [ 42.696721] ? build_skb+0x6f/0x260 [ 42.700327] ? tun_build_skb.isra.42+0x92f/0x1690 [ 42.705149] ? tun_get_user+0x1dad/0x2150 [ 42.709357] ? tun_chr_write_iter+0xde/0x190 [ 42.713742] ? vfs_write+0x18f/0x510 [ 42.717437] ? __skb_flow_get_ports+0x151/0x400 [ 42.722079] ? skb_flow_dissector_init+0x280/0x280 [ 42.726990] ? check_noncircular+0x20/0x20 [ 42.731209] ? __skb_flow_get_ports+0x151/0x400 [ 42.735855] ? __skb_flow_dissect+0x85b/0x3bc0 [ 42.740411] ? print_usage_bug+0x480/0x480 [ 42.744635] ? find_held_lock+0x39/0x1d0 [ 42.748685] ? lock_downgrade+0x990/0x990 [ 42.752809] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 42.757981] ? netif_receive_skb_internal+0x1d7/0x5e0 [ 42.763160] ? pvclock_read_flags+0x160/0x160 [ 42.767630] ? tun_build_skb.isra.42+0x455/0x1690 [ 42.772456] ? lock_acquire+0x1d5/0x580 [ 42.776403] ? netif_receive_skb_internal+0x93/0x5e0 [ 42.781496] ? ktime_get_with_offset+0x2c1/0x420 [ 42.786232] ? lock_release+0xd70/0xd70 [ 42.790186] ? ktime_get+0x3a0/0x3a0 [ 42.793877] ? skb_put+0x149/0x1c0 [ 42.797407] __netif_receive_skb+0x2c/0x1b0 [ 42.801706] ? __netif_receive_skb+0x2c/0x1b0 [ 42.806268] netif_receive_skb_internal+0x10b/0x5e0 [ 42.811266] ? __lru_cache_add+0x2a4/0x410 [ 42.815493] ? dev_cpu_dead+0xb00/0xb00 [ 42.819443] ? __pagevec_lru_add+0x30/0x30 [ 42.823658] ? get_mem_cgroup_from_mm+0x49b/0x710 [ 42.828477] ? rcu_pm_notify+0xc0/0xc0 [ 42.832350] netif_receive_skb+0xae/0x390 [ 42.836473] ? netif_receive_skb_internal+0x5e0/0x5e0 [ 42.841645] ? lock_downgrade+0x990/0x990 [ 42.845773] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 42.850594] tun_rx_batched.isra.43+0x5ed/0x860 [ 42.855236] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 42.859881] ? tun_sock_write_space+0x370/0x370 [ 42.864549] tun_get_user+0x11dd/0x2150 [ 42.868513] ? tun_build_skb.isra.42+0x1690/0x1690 [ 42.873421] ? lock_release+0xd70/0xd70 [ 42.877377] ? tun_chr_close+0x60/0x60 [ 42.881245] ? lock_release+0xd70/0xd70 [ 42.885198] ? __lock_is_held+0xbc/0x140 [ 42.889244] ? __tun_get+0x1d4/0x2e0 [ 42.892933] ? tun_chr_close+0x60/0x60 [ 42.896804] tun_chr_write_iter+0xde/0x190 [ 42.901016] __vfs_write+0x68a/0x970 [ 42.904710] ? default_llseek+0x2a0/0x2a0 [ 42.908844] ? avc_policy_seqno+0x9/0x20 [ 42.912880] ? selinux_file_permission+0x82/0x460 [ 42.917706] ? rw_verify_area+0xe5/0x2b0 [ 42.921741] ? __fdget_raw+0x20/0x20 [ 42.925436] vfs_write+0x18f/0x510 [ 42.928958] SyS_write+0xef/0x220 [ 42.932385] ? lockdep_sys_exit+0x47/0xf0 [ 42.936510] ? SyS_read+0x220/0x220 [ 42.940115] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.945108] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.949848] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.954576] RIP: 0033:0x405b81 [ 42.957741] RSP: 002b:00007f415fc57d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 42.965426] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b81 [ 42.972669] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 42.979913] RBP: 0000000000000082 R08: 0000000000000013 R09: 00007f415fc58700 [ 42.987157] R10: 00007f415fc589d0 R11: 0000000000000293 R12: 0000000000000000 [ 42.994402] R13: 00007ffcf364328f R14: 00007f415fc589c0 R15: 0000000000000000 [ 43.001665] [ 43.003265] The buggy address belongs to the page: [ 43.008169] page:ffffea000735f380 count:0 mapcount:0 mapping: (null) index:0xffff8801cd7cec00 [ 43.017589] flags: 0x200000000000000() [ 43.021460] raw: 0200000000000000 0000000000000000 ffff8801cd7cec00 00000000ffffffff [ 43.029313] raw: dead000000000100 dead000000000200 ffff8801dac00dc0 0000000000000000 [ 43.037162] page dumped because: kasan: bad access detected [ 43.042841] [ 43.044441] Memory state around the buggy address: [ 43.049342] ffff8801cd7ce780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 43.056672] ffff8801cd7ce800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 43.064004] >ffff8801cd7ce880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 43.071333] ^ [ 43.075452] ffff8801cd7ce900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 [ 43.082793] ffff8801cd7ce980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 43.090124] ================================================================== [ 43.097455] Disabling lock debugging due to kernel taint [ 43.102936] Kernel panic - not syncing: panic_on_warn set ... [ 43.102936]