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-kasan-gce-386-3,10.128.0.29' (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: [ 31.384104] ================================================================== [ 31.391502] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 31.398660] Read of size 4 at addr ffff8801ce79e708 by task syzkaller096665/3017 [ 31.406160] [ 31.407762] CPU: 0 PID: 3017 Comm: syzkaller096665 Not tainted 4.14.0-rc1+ #4 [ 31.415009] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.424336] Call Trace: [ 31.426895] dump_stack+0x194/0x257 [ 31.430497] ? arch_local_irq_restore+0x53/0x53 [ 31.435136] ? show_regs_print_info+0x65/0x65 [ 31.439605] ? lock_release+0xd70/0xd70 [ 31.443551] ? xfrm_state_find+0x305b/0x3190 [ 31.447934] print_address_description+0x73/0x250 [ 31.452748] ? xfrm_state_find+0x305b/0x3190 [ 31.457129] kasan_report+0x24e/0x340 [ 31.460905] __asan_report_load4_noabort+0x14/0x20 [ 31.465803] xfrm_state_find+0x305b/0x3190 [ 31.470031] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 31.475108] ? print_usage_bug+0x480/0x480 [ 31.479316] ? check_noncircular+0x20/0x20 [ 31.483523] ? find_held_lock+0x39/0x1d0 [ 31.487562] ? check_noncircular+0x20/0x20 [ 31.491770] ? lock_downgrade+0x990/0x990 [ 31.495900] ? find_held_lock+0x39/0x1d0 [ 31.499938] ? __lock_acquire+0x732/0x4620 [ 31.504142] ? find_held_lock+0x39/0x1d0 [ 31.508190] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.513353] ? depot_save_stack+0x1c2/0x490 [ 31.517647] ? unwind_dump+0x4c0/0x4c0 [ 31.521517] ? do_raw_spin_trylock+0x190/0x190 [ 31.526095] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 31.530319] ? __xfrm_decode_session+0x100/0x100 [ 31.535043] ? save_stack_trace+0x16/0x20 [ 31.539164] ? save_stack+0x43/0xd0 [ 31.542762] ? kasan_kmalloc+0xad/0xe0 [ 31.546620] ? kasan_slab_alloc+0x12/0x20 [ 31.550738] ? kmem_cache_alloc+0x12e/0x760 [ 31.555032] ? dst_alloc+0x11f/0x1a0 [ 31.558717] ? rt_dst_alloc+0xe9/0x540 [ 31.562575] ? ip_route_output_key_hash+0x20b/0x370 [ 31.567563] ? ip_route_output_flow+0x26/0xa0 [ 31.572035] ? inet_csk_route_req+0x5d8/0x990 [ 31.576502] ? tcp_v4_send_synack+0x1e4/0x270 [ 31.580968] ? tcp_rtx_synack+0x119/0x2e0 [ 31.585092] ? inet_rtx_syn_ack+0x64/0xd0 [ 31.589210] ? tcp_check_req+0xaf5/0x1630 [ 31.593329] ? tcp_v4_rcv+0x17b0/0x2f20 [ 31.597274] ? ip_local_deliver_finish+0x2e2/0xba0 [ 31.602178] ? check_noncircular+0x20/0x20 [ 31.606383] ? __netif_receive_skb_core+0x19af/0x33d0 [ 31.611541] ? __netif_receive_skb+0x2c/0x1b0 [ 31.616005] ? netif_receive_skb_internal+0x10b/0x670 [ 31.621167] ? check_noncircular+0x20/0x20 [ 31.625370] ? tun_chr_write_iter+0xde/0x190 [ 31.629747] ? __vfs_write+0x68a/0x970 [ 31.633610] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 31.639031] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 31.644034] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 31.648426] ? lock_downgrade+0x990/0x990 [ 31.652550] ? dst_init+0x4d9/0x6a0 [ 31.656161] ? xfrm_selector_match+0xe00/0xe00 [ 31.660720] ? rcu_read_lock_held+0xa9/0xc0 [ 31.665016] ? lock_release+0xd70/0xd70 [ 31.668979] ? refcount_inc_not_zero+0xfe/0x180 [ 31.673627] ? xfrm_selector_match+0x3b/0xe00 [ 31.678097] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 31.682829] ? xfrm_selector_match+0xe00/0xe00 [ 31.687386] ? check_noncircular+0x20/0x20 [ 31.691600] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 31.697025] xfrm_lookup+0xf0a/0x2540 [ 31.700794] ? xfrm_lookup+0xf0a/0x2540 [ 31.704754] ? ip_route_input_noref+0x1e0/0x1e0 [ 31.709408] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 31.715795] ? find_held_lock+0x39/0x1d0 [ 31.719839] ? lock_downgrade+0x990/0x990 [ 31.723957] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 31.729123] ? ip_route_output_key_hash+0x1a6/0x370 [ 31.734119] ? lock_release+0xd70/0xd70 [ 31.738066] ? selinux_nf_register+0x30/0x30 [ 31.742444] ? __lock_acquire+0x732/0x4620 [ 31.746659] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 31.752084] ? ip_route_output_key_hash+0x252/0x370 [ 31.757075] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 31.762591] xfrm_lookup_route+0x39/0x1a0 [ 31.766724] ip_route_output_flow+0x7c/0xa0 [ 31.771032] inet_csk_route_req+0x5d8/0x990 [ 31.775333] tcp_v4_send_synack+0x1e4/0x270 [ 31.779626] ? tcp_v4_send_check+0x90/0x90 [ 31.783838] ? sk_filter_trim_cap+0x12f/0x9b0 [ 31.788301] ? prandom_u32_state+0x13/0x180 [ 31.792595] tcp_rtx_synack+0x119/0x2e0 [ 31.796536] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 31.801438] ? __lock_is_held+0xbc/0x140 [ 31.805482] inet_rtx_syn_ack+0x64/0xd0 [ 31.809428] tcp_check_req+0xaf5/0x1630 [ 31.813379] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 31.818110] ? refcount_inc_not_zero+0xfe/0x180 [ 31.822760] ? refcount_add+0x60/0x60 [ 31.826530] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 31.831272] ? tcp_filter+0x111/0x160 [ 31.835067] tcp_v4_rcv+0x17b0/0x2f20 [ 31.838853] ? lock_acquire+0x1d5/0x580 [ 31.842814] ? tcp_v4_early_demux+0xa30/0xa30 [ 31.847310] ip_local_deliver_finish+0x2e2/0xba0 [ 31.852041] ? inet_del_offload+0x40/0x40 [ 31.856164] ? nf_hook_slow+0xd3/0x1a0 [ 31.860025] ip_local_deliver+0x1ce/0x6e0 [ 31.864144] ? ip_call_ra_chain+0x6d0/0x6d0 [ 31.868443] ? inet_del_offload+0x40/0x40 [ 31.872568] ip_rcv_finish+0x8db/0x19c0 [ 31.876520] ? ip_local_deliver_finish+0xba0/0xba0 [ 31.881417] ? iptable_nat_ipv4_fn+0x40/0x40 [ 31.885796] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 31.890262] ? ip_rcv+0xba0/0x17d0 [ 31.893771] ? tcp_v4_send_synack+0x270/0x270 [ 31.898238] ? nf_nat_ipv4_in+0x1cd/0x270 [ 31.902354] ? iptable_nat_ipv4_fn+0x40/0x40 [ 31.906740] ? nf_hook_slow+0xd3/0x1a0 [ 31.910601] ip_rcv+0xc3f/0x17d0 [ 31.913947] ? ip_local_deliver+0x6e0/0x6e0 [ 31.918241] ? __lock_acquire+0x732/0x4620 [ 31.922462] ? ip_local_deliver_finish+0xba0/0xba0 [ 31.927363] ? ip_local_deliver+0x6e0/0x6e0 [ 31.931665] __netif_receive_skb_core+0x19af/0x33d0 [ 31.936649] ? print_usage_bug+0x480/0x480 [ 31.940865] ? nf_ingress+0x9f0/0x9f0 [ 31.944648] ? kasan_kmalloc+0xad/0xe0 [ 31.948504] ? kmem_cache_alloc+0x12e/0x760 [ 31.952796] ? __build_skb+0x9d/0x450 [ 31.956574] ? build_skb+0x6f/0x260 [ 31.960169] ? tun_build_skb.isra.42+0x92f/0x1690 [ 31.964983] ? tun_get_user+0x1dad/0x2150 [ 31.969106] ? tun_chr_write_iter+0xde/0x190 [ 31.973484] ? __vfs_write+0x68a/0x970 [ 31.977356] ? __skb_flow_get_ports+0x151/0x400 [ 31.981996] ? skb_flow_dissector_init+0x280/0x280 [ 31.986902] ? check_noncircular+0x20/0x20 [ 31.991107] ? __skb_flow_get_ports+0x151/0x400 [ 31.995759] ? __skb_flow_dissect+0x85b/0x3bc0 [ 32.000330] ? find_held_lock+0x39/0x1d0 [ 32.004373] ? lock_downgrade+0x990/0x990 [ 32.008491] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 32.013653] ? lock_acquire+0x1d5/0x580 [ 32.017608] ? netif_receive_skb_internal+0x1d7/0x670 [ 32.022802] ? pvclock_read_flags+0x160/0x160 [ 32.027276] ? tun_build_skb.isra.42+0x455/0x1690 [ 32.032094] ? lock_acquire+0x1d5/0x580 [ 32.036037] ? netif_receive_skb_internal+0xa2/0x670 [ 32.041114] ? ktime_get_with_offset+0x2c1/0x420 [ 32.045844] ? lock_release+0xd70/0xd70 [ 32.049785] ? ktime_get+0x3a0/0x3a0 [ 32.053469] ? skb_put+0x149/0x1c0 [ 32.056989] __netif_receive_skb+0x2c/0x1b0 [ 32.061276] ? __netif_receive_skb+0x2c/0x1b0 [ 32.065741] netif_receive_skb_internal+0x10b/0x670 [ 32.070728] ? dev_cpu_dead+0xb00/0xb00 [ 32.074682] ? lock_release+0xd70/0xd70 [ 32.078625] ? __read_once_size_nocheck.constprop.8+0x10/0x10 [ 32.084479] ? is_bpf_text_address+0x7b/0x120 [ 32.088945] ? rcu_pm_notify+0xc0/0xc0 [ 32.092812] netif_receive_skb+0xae/0x390 [ 32.096928] ? netif_receive_skb_internal+0x670/0x670 [ 32.102092] ? lock_downgrade+0x990/0x990 [ 32.106214] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 32.111036] tun_rx_batched.isra.43+0x5ed/0x860 [ 32.115676] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 32.120314] ? tun_sock_write_space+0x370/0x370 [ 32.124970] tun_get_user+0x11dd/0x2150 [ 32.128928] ? tun_build_skb.isra.42+0x1690/0x1690 [ 32.133832] ? lock_release+0xd70/0xd70 [ 32.137780] ? tun_chr_close+0x60/0x60 [ 32.141643] ? lock_release+0xd70/0xd70 [ 32.145594] ? __lock_is_held+0xbc/0x140 [ 32.149637] ? __tun_get+0x1d4/0x2e0 [ 32.153325] ? tun_chr_close+0x60/0x60 [ 32.157194] tun_chr_write_iter+0xde/0x190 [ 32.161404] __vfs_write+0x68a/0x970 [ 32.165093] ? kernel_read+0x120/0x120 [ 32.168962] ? avc_policy_seqno+0x9/0x20 [ 32.172993] ? selinux_file_permission+0x82/0x460 [ 32.177816] ? rw_verify_area+0xe5/0x2b0 [ 32.181847] ? __fdget_raw+0x20/0x20 [ 32.185536] vfs_write+0x18f/0x510 [ 32.189052] SyS_write+0xef/0x220 [ 32.192478] ? SyS_read+0x220/0x220 [ 32.196078] ? lock_acquire+0x1d5/0x580 [ 32.200022] ? finish_task_switch+0x1aa/0x740 [ 32.204488] ? do_fast_syscall_32+0x158/0xeed [ 32.208965] ? SyS_read+0x220/0x220 [ 32.212562] do_fast_syscall_32+0x3f2/0xeed [ 32.216854] ? compat_start_thread+0x80/0x80 [ 32.221243] ? do_int80_syscall_32+0x930/0x930 [ 32.225798] ? lockdep_sys_exit+0x47/0xf0 [ 32.229915] ? syscall_return_slowpath+0x2b3/0x500 [ 32.234813] ? finish_task_switch+0x1aa/0x740 [ 32.239279] ? prepare_exit_to_usermode+0x2c0/0x2c0 [ 32.244269] ? sysret32_from_system_call+0x5/0x3b [ 32.249086] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.253906] entry_SYSENTER_compat+0x51/0x60 [ 32.258282] RIP: 0023:0xf7fdac79 [ 32.261616] RSP: 002b:00000000f2fcc1f4 EFLAGS: 00000292 ORIG_RAX: 0000000000000004 [ 32.269294] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020002000 [ 32.276534] RDX: 0000000000000036 RSI: 0000000000000000 RDI: 00000000003d0f00 [ 32.283771] RBP: 00000000f2fcc2e8 R08: 0000000000000000 R09: 0000000000000000 [ 32.291011] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 32.298251] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.305505] [ 32.307100] The buggy address belongs to the page: [ 32.312007] page:ffffea000739e780 count:0 mapcount:0 mapping: (null) index:0xffff8801ce79ec00 [ 32.321424] flags: 0x200000000000000() [ 32.325282] raw: 0200000000000000 0000000000000000 ffff8801ce79ec00 00000000ffffffff [ 32.333129] raw: 0000000000000000 dead000000000200 ffff8801dac00dc0 0000000000000000 [ 32.340975] page dumped because: kasan: bad access detected [ 32.346649] [ 32.348244] Memory state around the buggy address: [ 32.353140] ffff8801ce79e600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.361008] ffff8801ce79e680: 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 [ 32.368337] >ffff8801ce79e700: 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 f1 f1 [ 32.375673] ^ [ 32.379271] ffff8801ce79e780: f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 f3 f3