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-4,10.128.0.10' (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: [ 40.619223] ================================================================== [ 40.626851] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 40.634029] Read of size 4 at addr ffff8801ce746898 by task syzkaller354196/3017 [ 40.641533] [ 40.643140] CPU: 1 PID: 3017 Comm: syzkaller354196 Not tainted 4.13.0-mm1+ #5 [ 40.650397] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.659728] Call Trace: [ 40.662296] dump_stack+0x194/0x257 [ 40.665905] ? arch_local_irq_restore+0x53/0x53 [ 40.670546] ? show_regs_print_info+0x65/0x65 [ 40.675019] ? lock_release+0xd70/0xd70 [ 40.678965] ? print_usage_bug+0x480/0x480 [ 40.683176] ? xfrm_state_find+0x305b/0x3190 [ 40.687581] print_address_description+0x73/0x250 [ 40.692407] ? xfrm_state_find+0x305b/0x3190 [ 40.696811] kasan_report+0x24e/0x340 [ 40.700589] __asan_report_load4_noabort+0x14/0x20 [ 40.705499] xfrm_state_find+0x305b/0x3190 [ 40.709729] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 40.714805] ? trace_hardirqs_on_caller+0x19e/0x5c0 [ 40.719796] ? check_noncircular+0x20/0x20 [ 40.724019] ? find_held_lock+0x39/0x1d0 [ 40.728060] ? check_noncircular+0x20/0x20 [ 40.732282] ? lock_downgrade+0x990/0x990 [ 40.736411] ? find_held_lock+0x39/0x1d0 [ 40.740626] ? __lock_acquire+0x732/0x4620 [ 40.744836] ? find_held_lock+0x39/0x1d0 [ 40.748888] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 40.754056] ? depot_save_stack+0x1c2/0x490 [ 40.758352] ? unwind_dump+0x4c0/0x4c0 [ 40.762224] ? do_raw_spin_trylock+0x190/0x190 [ 40.766793] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 40.771018] ? __xfrm_decode_session+0x100/0x100 [ 40.775750] ? save_stack_trace+0x16/0x20 [ 40.779878] ? save_stack+0x43/0xd0 [ 40.783479] ? kasan_kmalloc+0xad/0xe0 [ 40.787337] ? kasan_slab_alloc+0x12/0x20 [ 40.791460] ? kmem_cache_alloc+0x12e/0x760 [ 40.795839] ? dst_alloc+0x11f/0x1a0 [ 40.799536] ? rt_dst_alloc+0xe9/0x540 [ 40.803396] ? ip_route_output_key_hash+0x20b/0x370 [ 40.808393] ? ip_route_output_flow+0x26/0xa0 [ 40.812982] ? inet_csk_route_req+0x5d8/0x990 [ 40.817468] ? tcp_v4_send_synack+0x1e4/0x270 [ 40.822062] ? tcp_rtx_synack+0x119/0x2e0 [ 40.826209] ? inet_rtx_syn_ack+0x64/0xd0 [ 40.830345] ? tcp_check_req+0xaf5/0x1630 [ 40.834468] ? tcp_v4_rcv+0x1f57/0x2f20 [ 40.838422] ? ip_local_deliver_finish+0x2e2/0xba0 [ 40.843419] ? check_noncircular+0x20/0x20 [ 40.847629] ? __netif_receive_skb_core+0x19af/0x33d0 [ 40.852792] ? __netif_receive_skb+0x2c/0x1b0 [ 40.857261] ? netif_receive_skb_internal+0x10b/0x5e0 [ 40.862435] ? check_noncircular+0x20/0x20 [ 40.866647] ? tun_chr_write_iter+0xde/0x190 [ 40.871302] ? __vfs_write+0x68a/0x970 [ 40.875181] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 40.880610] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 40.885707] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 40.890201] ? lock_downgrade+0x990/0x990 [ 40.894329] ? dst_init+0x4d9/0x6a0 [ 40.897962] ? xfrm_selector_match+0xe00/0xe00 [ 40.902523] ? rcu_read_lock_held+0xa9/0xc0 [ 40.906823] ? lock_release+0xd70/0xd70 [ 40.910777] ? refcount_inc_not_zero+0xfe/0x180 [ 40.915428] ? xfrm_selector_match+0x3b/0xe00 [ 40.919920] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 40.924657] ? xfrm_selector_match+0xe00/0xe00 [ 40.929218] ? check_noncircular+0x20/0x20 [ 40.933437] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 40.938883] xfrm_lookup+0xf0a/0x2540 [ 40.942661] ? xfrm_lookup+0xf0a/0x2540 [ 40.946615] ? ip_route_input_noref+0x1e0/0x1e0 [ 40.951275] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 40.957676] ? find_held_lock+0x39/0x1d0 [ 40.961724] ? lock_downgrade+0x990/0x990 [ 40.965847] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 40.971021] ? ip_route_output_key_hash+0x1a6/0x370 [ 40.976019] ? lock_release+0xd70/0xd70 [ 40.979969] ? selinux_nf_register+0x30/0x30 [ 40.984357] ? __lock_acquire+0x732/0x4620 [ 40.988575] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 40.993833] ? ip_route_output_key_hash+0x252/0x370 [ 40.998831] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 41.004361] xfrm_lookup_route+0x39/0x1a0 [ 41.008490] ip_route_output_flow+0x7c/0xa0 [ 41.012789] inet_csk_route_req+0x5d8/0x990 [ 41.017108] tcp_v4_send_synack+0x1e4/0x270 [ 41.021407] ? tcp_v4_send_check+0x90/0x90 [ 41.025667] ? sk_filter_trim_cap+0x12f/0x9b0 [ 41.030156] ? prandom_u32_state+0x13/0x180 [ 41.034459] tcp_rtx_synack+0x119/0x2e0 [ 41.038410] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 41.043319] ? __lock_is_held+0xbc/0x140 [ 41.047367] inet_rtx_syn_ack+0x64/0xd0 [ 41.051328] tcp_check_req+0xaf5/0x1630 [ 41.055370] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 41.060185] ? refcount_inc_not_zero+0xfe/0x180 [ 41.064837] ? refcount_add+0x60/0x60 [ 41.068616] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 41.073353] ? tcp_filter+0x111/0x160 [ 41.077131] tcp_v4_rcv+0x1f57/0x2f20 [ 41.081178] ? lock_acquire+0x1d5/0x580 [ 41.085148] ? tcp_v4_early_demux+0xa30/0xa30 [ 41.089718] ip_local_deliver_finish+0x2e2/0xba0 [ 41.094458] ? inet_del_offload+0x40/0x40 [ 41.098587] ? nf_hook_slow+0xd3/0x1a0 [ 41.102454] ip_local_deliver+0x1ce/0x6e0 [ 41.106614] ? ip_call_ra_chain+0x6d0/0x6d0 [ 41.111949] ? inet_del_offload+0x40/0x40 [ 41.116098] ip_rcv_finish+0x8db/0x19c0 [ 41.120224] ? ip_local_deliver_finish+0xba0/0xba0 [ 41.125163] ? iptable_nat_ipv4_fn+0x40/0x40 [ 41.129583] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 41.134088] ? ip_rcv+0xbe0/0x17d0 [ 41.137638] ? find_held_lock+0x39/0x1d0 [ 41.141721] ? tcp_v4_send_synack+0x270/0x270 [ 41.146497] ? nf_nat_ipv4_in+0x1cd/0x270 [ 41.150652] ? iptable_nat_ipv4_fn+0x40/0x40 [ 41.155088] ? nf_hook_slow+0xd3/0x1a0 [ 41.158999] ip_rcv+0xc3f/0x17d0 [ 41.162393] ? ip_local_deliver+0x6e0/0x6e0 [ 41.166734] ? __lock_acquire+0x732/0x4620 [ 41.171169] ? ip_local_deliver_finish+0xba0/0xba0 [ 41.176122] ? ip_local_deliver+0x6e0/0x6e0 [ 41.180473] __netif_receive_skb_core+0x19af/0x33d0 [ 41.185506] ? print_usage_bug+0x480/0x480 [ 41.189763] ? nf_ingress+0x9f0/0x9f0 [ 41.193570] ? save_stack+0x43/0xd0 [ 41.197199] ? kasan_slab_alloc+0x12/0x20 [ 41.201351] ? kmem_cache_alloc+0x12e/0x760 [ 41.205675] ? __build_skb+0x9d/0x450 [ 41.209480] ? build_skb+0x6f/0x260 [ 41.213108] ? tun_build_skb.isra.42+0x92f/0x1690 [ 41.217962] ? tun_get_user+0x1dad/0x2150 [ 41.222114] ? tun_chr_write_iter+0xde/0x190 [ 41.226536] ? vfs_write+0x18f/0x510 [ 41.230261] ? __skb_flow_get_ports+0x151/0x400 [ 41.234914] ? skb_flow_dissector_init+0x280/0x280 [ 41.239832] ? check_noncircular+0x20/0x20 [ 41.244044] ? __skb_flow_get_ports+0x151/0x400 [ 41.248692] ? __skb_flow_dissect+0x85b/0x3bc0 [ 41.253247] ? print_usage_bug+0x480/0x480 [ 41.257480] ? find_held_lock+0x39/0x1d0 [ 41.261526] ? lock_downgrade+0x990/0x990 [ 41.265649] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 41.270818] ? netif_receive_skb_internal+0x1d7/0x5e0 [ 41.276001] ? pvclock_read_flags+0x160/0x160 [ 41.280471] ? tun_build_skb.isra.42+0x455/0x1690 [ 41.285297] ? lock_acquire+0x1d5/0x580 [ 41.289255] ? netif_receive_skb_internal+0x93/0x5e0 [ 41.294336] ? ktime_get_with_offset+0x2c1/0x420 [ 41.299068] ? lock_release+0xd70/0xd70 [ 41.303015] ? ktime_get+0x3a0/0x3a0 [ 41.306706] ? skb_put+0x149/0x1c0 [ 41.310233] __netif_receive_skb+0x2c/0x1b0 [ 41.314532] ? __netif_receive_skb+0x2c/0x1b0 [ 41.319003] netif_receive_skb_internal+0x10b/0x5e0 [ 41.323996] ? dev_cpu_dead+0xb00/0xb00 [ 41.327952] ? is_bpf_text_address+0xa4/0x120 [ 41.332427] ? rcu_pm_notify+0xc0/0xc0 [ 41.336307] ? unwind_get_return_address+0x61/0xa0 [ 41.341223] netif_receive_skb+0xae/0x390 [ 41.345344] ? netif_receive_skb_internal+0x5e0/0x5e0 [ 41.350525] ? lock_downgrade+0x990/0x990 [ 41.354650] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 41.359472] tun_rx_batched.isra.43+0x5ed/0x860 [ 41.364121] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 41.368765] ? tun_sock_write_space+0x370/0x370 [ 41.373428] tun_get_user+0x11dd/0x2150 [ 41.377394] ? tun_build_skb.isra.42+0x1690/0x1690 [ 41.382304] ? lock_release+0xd70/0xd70 [ 41.386259] ? tun_chr_close+0x60/0x60 [ 41.390141] ? lock_release+0xd70/0xd70 [ 41.394096] ? __lock_is_held+0xbc/0x140 [ 41.398153] ? __tun_get+0x1d4/0x2e0 [ 41.401846] ? tun_chr_close+0x60/0x60 [ 41.405717] tun_chr_write_iter+0xde/0x190 [ 41.409935] __vfs_write+0x68a/0x970 [ 41.413640] ? default_llseek+0x2a0/0x2a0 [ 41.417777] ? avc_policy_seqno+0x9/0x20 [ 41.421817] ? selinux_file_permission+0x82/0x460 [ 41.426654] ? rw_verify_area+0xe5/0x2b0 [ 41.430690] ? __fdget_raw+0x20/0x20 [ 41.434391] vfs_write+0x18f/0x510 [ 41.437910] SyS_write+0xef/0x220 [ 41.441342] ? SyS_read+0x220/0x220 [ 41.444948] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.449951] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.454698] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.459427] RIP: 0033:0x405b41 [ 41.462591] RSP: 002b:00007f2a86d72d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 41.470279] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b41 [ 41.477531] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 41.484773] RBP: 0000000000000082 R08: 0000000000000013 R09: 00007f2a86d73700 [ 41.492016] R10: 00007f2a86d739d0 R11: 0000000000000293 R12: 0000000000000000 [ 41.499260] R13: 00007ffd79a9883f R14: 00007f2a86d739c0 R15: 0000000000000000 [ 41.506696] [ 41.508298] The buggy address belongs to the page: [ 41.513232] page:ffffea000739d180 count:0 mapcount:0 mapping: (null) index:0xffff8801ce746d40 [ 41.522680] flags: 0x200000000000000() [ 41.526547] raw: 0200000000000000 0000000000000000 ffff8801ce746d40 00000000ffffffff [ 41.534812] raw: 0000000000000000 dead000000000200 0000000000000000 0000000000000000 [ 41.542677] page dumped because: kasan: bad access detected [ 41.548372] [ 41.550058] Memory state around the buggy address: [ 41.554993] ffff8801ce746780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.562329] ffff8801ce746800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 41.569662] >ffff8801ce746880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 41.576991] ^ [ 41.581122] ffff8801ce746900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 [ 41.588541] ffff8801ce746980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.595882] ================================================================== [ 41.603220] Disabling lock debugging due to kernel taint [ 41.608684] Kernel panic - not syncing: panic_on_warn set ... [ 41.608684]