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-net-kasan-gce-9,10.128.0.39' (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: [ 41.772679] ================================================================== [ 41.773783] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x303d/0x3170 [ 41.774774] Read of size 4 at addr ffff8801d1fce898 by task syzkaller196849/3039 [ 41.775759] [ 41.775995] CPU: 1 PID: 3039 Comm: syzkaller196849 Not tainted 4.13.0-rc5+ #14 [ 41.776959] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.778176] Call Trace: [ 41.778547] dump_stack+0x194/0x257 [ 41.779038] ? arch_local_irq_restore+0x53/0x53 [ 41.779659] ? show_regs_print_info+0x65/0x65 [ 41.780262] ? lock_release+0xa40/0xa40 [ 41.780799] ? xfrm_state_find+0x303d/0x3170 [ 41.781390] print_address_description+0x73/0x250 [ 41.782038] ? xfrm_state_find+0x303d/0x3170 [ 41.782627] kasan_report+0x24e/0x340 [ 41.783142] __asan_report_load4_noabort+0x14/0x20 [ 41.783817] xfrm_state_find+0x303d/0x3170 [ 41.784382] ? print_usage_bug+0x480/0x480 [ 41.784978] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 41.785660] ? print_usage_bug+0x480/0x480 [ 41.786240] ? print_usage_bug+0x480/0x480 [ 41.786810] ? __lock_acquire+0x6ef/0x3dc0 [ 41.787407] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 41.788118] ? __lock_acquire+0x6ef/0x3dc0 [ 41.788703] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 41.789479] ? print_usage_bug+0x480/0x480 [ 41.790064] ? check_noncircular+0x20/0x20 [ 41.790636] xfrm_tmpl_resolve+0x309/0xc00 [ 41.791234] ? __xfrm_dst_lookup+0x120/0x120 [ 41.791837] ? __lock_is_held+0xb6/0x140 [ 41.792403] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.794829] ? fib_table_lookup+0xa07/0x1a30 [ 41.799213] xfrm_resolve_and_create_bundle+0x186/0x2460 [ 41.804653] ? check_noncircular+0x20/0x20 [ 41.808870] ? check_noncircular+0x20/0x20 [ 41.813079] ? __xfrm_decode_session+0x100/0x100 [ 41.817806] ? find_held_lock+0x35/0x1d0 [ 41.821845] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 41.826569] ? lock_downgrade+0x990/0x990 [ 41.830687] ? lock_release+0xa40/0xa40 [ 41.834634] ? refcount_inc_not_zero+0xfe/0x180 [ 41.839284] ? xfrm_selector_match+0x3b/0xe00 [ 41.843750] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 41.848478] ? xfrm_selector_match+0xe00/0xe00 [ 41.853038] xfrm_lookup+0xef8/0x2520 [ 41.856804] ? xfrm_lookup+0xef8/0x2520 [ 41.860757] ? xfrm_policy_lookup_bytype.constprop.48+0x16f0/0x16f0 [ 41.867137] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 41.872295] ? netlbl_catmap_setrng+0xb0/0xb0 [ 41.876763] ? find_held_lock+0x35/0x1d0 [ 41.880807] ? ip_route_output_key_hash+0x229/0x370 [ 41.885791] ? lock_downgrade+0x990/0x990 [ 41.889916] ? lock_release+0xa40/0xa40 [ 41.893863] ? selinux_nf_register+0x30/0x30 [ 41.898249] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 41.903500] ? ip_route_output_key_hash+0x252/0x370 [ 41.908482] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 41.913993] xfrm_lookup_route+0x39/0x1a0 [ 41.918121] ip_route_output_flow+0x7c/0xa0 [ 41.922415] inet_csk_route_req+0x5d8/0x990 [ 41.926720] ? selinux_socket_sock_rcv_skb+0x388/0x870 [ 41.931977] tcp_v4_send_synack+0x1e4/0x270 [ 41.936267] ? tcp_v4_send_check+0x90/0x90 [ 41.940478] ? sk_filter_trim_cap+0x3f3/0x9b0 [ 41.944941] ? prandom_u32_state+0x13/0x180 [ 41.949243] tcp_rtx_synack+0x119/0x2e0 [ 41.953184] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 41.958084] ? __lock_is_held+0xb6/0x140 [ 41.962123] inet_rtx_syn_ack+0x64/0xd0 [ 41.966072] tcp_check_req+0xae3/0x1620 [ 41.970026] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 41.974757] ? refcount_inc_not_zero+0xfe/0x180 [ 41.979396] ? refcount_add+0x60/0x60 [ 41.983165] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 41.987894] ? tcp_filter+0x111/0x160 [ 41.991664] tcp_v4_rcv+0x1e68/0x2e10 [ 41.995433] ? lock_acquire+0x1d5/0x580 [ 41.999373] ? lock_acquire+0x1d5/0x580 [ 42.003333] ? tcp_v4_early_demux+0xa30/0xa30 [ 42.007806] ip_local_deliver_finish+0x2e2/0xba0 [ 42.012534] ? inet_del_offload+0x40/0x40 [ 42.016660] ip_local_deliver+0x1ce/0x6d0 [ 42.020774] ? ip_call_ra_chain+0x6d0/0x6d0 [ 42.025070] ? inet_del_offload+0x40/0x40 [ 42.029198] ip_rcv_finish+0x8db/0x19c0 [ 42.033137] ? iptable_nat_ipv4_fn+0x40/0x40 [ 42.037521] ? ip_local_deliver_finish+0xba0/0xba0 [ 42.042424] ? ip_rcv+0xf05/0x17d0 [ 42.045930] ? lock_downgrade+0x990/0x990 [ 42.050045] ? tcp_v4_send_synack+0x270/0x270 [ 42.054511] ? rcu_read_lock_held+0xa9/0xc0 [ 42.058803] ? nf_hook_slow+0x12d/0x290 [ 42.062762] ip_rcv+0xc3f/0x17d0 [ 42.066104] ? ip_local_deliver+0x6d0/0x6d0 [ 42.070408] ? ip_local_deliver_finish+0xba0/0xba0 [ 42.075305] ? ip_local_deliver+0x6d0/0x6d0 [ 42.079600] __netif_receive_skb_core+0x19af/0x33d0 [ 42.084602] ? unwind_get_return_address+0x61/0xa0 [ 42.089508] ? nf_ingress+0x9f0/0x9f0 [ 42.093281] ? save_stack+0xa3/0xd0 [ 42.096877] ? save_stack_trace+0x16/0x20 [ 42.100988] ? save_stack+0x43/0xd0 [ 42.104581] ? kasan_kmalloc+0xad/0xe0 [ 42.108437] ? kasan_slab_alloc+0x12/0x20 [ 42.112552] ? kmem_cache_alloc+0x127/0x750 [ 42.116840] ? __build_skb+0x9d/0x450 [ 42.120607] ? build_skb+0x6f/0x260 [ 42.124207] ? tun_get_user+0x1daf/0x2150 [ 42.128325] ? tun_chr_write_iter+0xd8/0x190 [ 42.132700] ? __vfs_write+0x684/0x970 [ 42.136553] ? vfs_write+0x189/0x510 [ 42.140231] ? __skb_flow_get_ports+0x151/0x400 [ 42.144866] ? skb_flow_dissector_init+0x280/0x280 [ 42.149763] ? __skb_flow_get_ports+0x151/0x400 [ 42.154400] ? check_noncircular+0x20/0x20 [ 42.158600] ? __skb_flow_dissect+0xfa6/0x3ad0 [ 42.163162] ? __skb_flow_get_ports+0x400/0x400 [ 42.167800] ? find_held_lock+0x35/0x1d0 [ 42.171839] ? netif_receive_skb_internal+0x1d7/0x5e0 [ 42.176995] ? lock_downgrade+0x990/0x990 [ 42.181127] ? pvclock_read_flags+0x160/0x160 [ 42.185604] ? lock_acquire+0x1d5/0x580 [ 42.189545] ? lock_acquire+0x1d5/0x580 [ 42.193487] ? netif_receive_skb_internal+0x93/0x5e0 [ 42.198560] ? ktime_get_with_offset+0x2c1/0x420 [ 42.203285] ? lock_release+0xa40/0xa40 [ 42.207224] ? do_gettimeofday+0x190/0x190 [ 42.211433] __netif_receive_skb+0x2c/0x1b0 [ 42.215719] ? __netif_receive_skb+0x2c/0x1b0 [ 42.220181] netif_receive_skb_internal+0x10b/0x5e0 [ 42.225166] ? dev_cpu_dead+0xb00/0xb00 [ 42.229105] ? tun_net_xmit+0x1280/0x1280 [ 42.233218] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 42.238376] ? rcu_pm_notify+0xc0/0xc0 [ 42.242244] netif_receive_skb+0xae/0x390 [ 42.246362] ? netif_receive_skb_internal+0x5e0/0x5e0 [ 42.251528] ? tun_rx_batched.isra.43+0x5bd/0x860 [ 42.256340] tun_rx_batched.isra.43+0x5e7/0x860 [ 42.260975] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 42.265609] ? tun_sock_write_space+0x370/0x370 [ 42.270244] ? tun_free_netdev+0x1b0/0x1b0 [ 42.274454] ? check_noncircular+0x20/0x20 [ 42.278661] tun_get_user+0x11dd/0x2150 [ 42.282622] ? tun_flow_update+0xf70/0xf70 [ 42.286831] ? __tun_get+0x1ab/0x2e0 [ 42.290513] ? lock_downgrade+0x990/0x990 [ 42.294631] ? lock_release+0xa40/0xa40 [ 42.298572] ? __lock_is_held+0xb6/0x140 [ 42.302612] ? __tun_get+0x1d4/0x2e0 [ 42.306291] ? tun_chr_close+0x60/0x60 [ 42.310159] tun_chr_write_iter+0xd8/0x190 [ 42.314365] __vfs_write+0x684/0x970 [ 42.318048] ? default_llseek+0x290/0x290 [ 42.322173] ? avc_policy_seqno+0x9/0x20 [ 42.326201] ? selinux_file_permission+0x82/0x460 [ 42.331019] ? rw_verify_area+0xe5/0x2b0 [ 42.335046] ? __fdget_raw+0x20/0x20 [ 42.338730] vfs_write+0x189/0x510 [ 42.342242] SyS_write+0xef/0x220 [ 42.345665] ? SyS_read+0x220/0x220 [ 42.349256] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.354245] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.358977] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.363700] RIP: 0033:0x405b91 [ 42.366856] RSP: 002b:00007f6b30c22d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 42.374532] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b91 [ 42.381770] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 42.389009] RBP: 0000000000000086 R08: 0000000000000013 R09: 00007f6b30c23700 [ 42.396251] R10: 00007f6b30c239d0 R11: 0000000000000293 R12: 0000000000000000 [ 42.403489] R13: 00007fff0b27881f R14: 00007f6b30c239c0 R15: 0000000000000000 [ 42.410750] [ 42.412344] The buggy address belongs to the page: [ 42.417239] page:ffffea000747f380 count:0 mapcount:0 mapping: (null) index:0xffff8801d1fcec00 [ 42.426652] flags: 0x200000000000000() [ 42.430512] raw: 0200000000000000 0000000000000000 ffff8801d1fcec00 00000000ffffffff [ 42.438362] raw: 0000000000000000 dead000000000200 0000000000000000 0000000000000000 [ 42.446210] page dumped because: kasan: bad access detected [ 42.451884] [ 42.453479] Memory state around the buggy address: [ 42.458386] ffff8801d1fce780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.465713] ffff8801d1fce800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 42.473037] >ffff8801d1fce880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 42.480360] ^ [ 42.484480] ffff8801d1fce900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 f2 f2 f3 [ 42.491804] ffff8801d1fce980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.499127] ================================================================== [ 42.506449] Disabling lock debugging due to kernel taint [ 42.511908] Kernel panic - not syncing: panic_on_warn set ... [ 42.511908] [ 42.519239] CPU: 1 PID: 3039 Comm: syzkaller196849 Tainted: G B 4.13.0-rc5+ #14 [ 42.527786] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.537113] Call Trace: [ 42.539668] dump_stack+0x194/0x257 [ 42.543267] ? arch_local_irq_restore+0x53/0x53 [ 42.547902] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.552621] ? handle_irq_event+0xb2/0x140 [ 42.556837] ? xfrm_state_find+0x2fb0/0x3170 [ 42.561212] panic+0x1e4/0x417 [ 42.564368] ? __warn+0x1d9/0x1d9 [ 42.567791] ? xfrm_state_find+0x303d/0x3170 [ 42.572164] kasan_end_report+0x50/0x50 [ 42.576101] kasan_report+0x137/0x340 [ 42.579868] __asan_report_load4_noabort+0x14/0x20 [ 42.584762] xfrm_state_find+0x303d/0x3170 [ 42.588968] ? print_usage_bug+0x480/0x480 [ 42.593175] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 42.598248] ? print_usage_bug+0x480/0x480 [ 42.602453] ? print_usage_bug+0x480/0x480 [ 42.606661] ? __lock_acquire+0x6ef/0x3dc0 [ 42.610868] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 42.616032] ? __lock_acquire+0x6ef/0x3dc0 [ 42.620248] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 42.625404] ? print_usage_bug+0x480/0x480 [ 42.629606] ? check_noncircular+0x20/0x20 [ 42.633808] xfrm_tmpl_resolve+0x309/0xc00 [ 42.638013] ? __xfrm_dst_lookup+0x120/0x120 [ 42.642390] ? __lock_is_held+0xb6/0x140 [ 42.646423] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.651412] ? fib_table_lookup+0xa07/0x1a30 [ 42.655789] xfrm_resolve_and_create_bundle+0x186/0x2460 [ 42.661207] ? check_noncircular+0x20/0x20 [ 42.665420] ? check_noncircular+0x20/0x20 [ 42.669618] ? __xfrm_decode_session+0x100/0x100 [ 42.674340] ? find_held_lock+0x35/0x1d0 [ 42.678370] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 42.683093] ? lock_downgrade+0x990/0x990 [ 42.687208] ? lock_release+0xa40/0xa40 [ 42.691147] ? refcount_inc_not_zero+0xfe/0x180 [ 42.695782] ? xfrm_selector_match+0x3b/0xe00 [ 42.700242] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 42.704965] ? xfrm_selector_match+0xe00/0xe00 [ 42.709516] xfrm_lookup+0xef8/0x2520 [ 42.713279] ? xfrm_lookup+0xef8/0x2520 [ 42.717225] ? xfrm_policy_lookup_bytype.constprop.48+0x16f0/0x16f0 [ 42.723600] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 42.728757] ? netlbl_catmap_setrng+0xb0/0xb0 [ 42.733219] ? find_held_lock+0x35/0x1d0 [ 42.737251] ? ip_route_output_key_hash+0x229/0x370 [ 42.742232] ? lock_downgrade+0x990/0x990 [ 42.746347] ? lock_release+0xa40/0xa40 [ 42.750287] ? selinux_nf_register+0x30/0x30 [ 42.754664] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 42.759905] ? ip_route_output_key_hash+0x252/0x370 [ 42.764886] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 42.770722] xfrm_lookup_route+0x39/0x1a0