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-1,10.128.15.209' (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.472489] ================================================================== [ 41.479890] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 41.487050] Read of size 4 at addr ffff8801cd386708 by task syzkaller461063/3017 [ 41.494551] [ 41.496163] CPU: 1 PID: 3017 Comm: syzkaller461063 Not tainted 4.14.0-rc1+ #4 [ 41.503415] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.512746] Call Trace: [ 41.515306] dump_stack+0x194/0x257 [ 41.518910] ? arch_local_irq_restore+0x53/0x53 [ 41.523550] ? show_regs_print_info+0x65/0x65 [ 41.528022] ? lock_release+0xd70/0xd70 [ 41.531966] ? print_usage_bug+0x480/0x480 [ 41.536180] ? xfrm_state_find+0x305b/0x3190 [ 41.540565] print_address_description+0x73/0x250 [ 41.545378] ? xfrm_state_find+0x305b/0x3190 [ 41.549761] kasan_report+0x24e/0x340 [ 41.553538] __asan_report_load4_noabort+0x14/0x20 [ 41.558439] xfrm_state_find+0x305b/0x3190 [ 41.562670] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 41.567746] ? print_usage_bug+0x480/0x480 [ 41.571953] ? check_noncircular+0x20/0x20 [ 41.576164] ? find_held_lock+0x39/0x1d0 [ 41.580204] ? check_noncircular+0x20/0x20 [ 41.584416] ? lock_downgrade+0x990/0x990 [ 41.588545] ? find_held_lock+0x39/0x1d0 [ 41.592586] ? __lock_acquire+0x732/0x4620 [ 41.596803] ? find_held_lock+0x39/0x1d0 [ 41.600855] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 41.606021] ? depot_save_stack+0x1c2/0x490 [ 41.610318] ? unwind_dump+0x4c0/0x4c0 [ 41.614181] ? do_raw_spin_trylock+0x190/0x190 [ 41.618752] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 41.622989] ? __xfrm_decode_session+0x100/0x100 [ 41.627720] ? save_stack_trace+0x16/0x20 [ 41.631839] ? save_stack+0x43/0xd0 [ 41.635438] ? kasan_kmalloc+0xad/0xe0 [ 41.639297] ? kasan_slab_alloc+0x12/0x20 [ 41.643414] ? kmem_cache_alloc+0x12e/0x760 [ 41.647708] ? dst_alloc+0x11f/0x1a0 [ 41.651393] ? rt_dst_alloc+0xe9/0x540 [ 41.655251] ? ip_route_output_key_hash+0x20b/0x370 [ 41.660236] ? ip_route_output_flow+0x26/0xa0 [ 41.664699] ? inet_csk_route_req+0x5d8/0x990 [ 41.669168] ? tcp_v4_send_synack+0x1e4/0x270 [ 41.673633] ? tcp_rtx_synack+0x119/0x2e0 [ 41.677765] ? inet_rtx_syn_ack+0x64/0xd0 [ 41.681888] ? tcp_check_req+0xaf5/0x1630 [ 41.686013] ? tcp_v4_rcv+0x17b0/0x2f20 [ 41.689965] ? ip_local_deliver_finish+0x2e2/0xba0 [ 41.694867] ? check_noncircular+0x20/0x20 [ 41.699075] ? __netif_receive_skb_core+0x19af/0x33d0 [ 41.704237] ? __netif_receive_skb+0x2c/0x1b0 [ 41.708702] ? netif_receive_skb_internal+0x10b/0x670 [ 41.713868] ? check_noncircular+0x20/0x20 [ 41.718073] ? tun_chr_write_iter+0xde/0x190 [ 41.722461] ? __vfs_write+0x68a/0x970 [ 41.726332] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 41.731755] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 41.736759] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 41.741143] ? lock_downgrade+0x990/0x990 [ 41.745262] ? dst_init+0x4d9/0x6a0 [ 41.748883] ? xfrm_selector_match+0xe00/0xe00 [ 41.753446] ? rcu_read_lock_held+0xa9/0xc0 [ 41.757746] ? lock_release+0xd70/0xd70 [ 41.761700] ? refcount_inc_not_zero+0xfe/0x180 [ 41.766349] ? xfrm_selector_match+0x3b/0xe00 [ 41.770823] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 41.775556] ? xfrm_selector_match+0xe00/0xe00 [ 41.780115] ? check_noncircular+0x20/0x20 [ 41.784325] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 41.789755] xfrm_lookup+0xf0a/0x2540 [ 41.793526] ? xfrm_lookup+0xf0a/0x2540 [ 41.797473] ? ip_route_input_noref+0x1e0/0x1e0 [ 41.802123] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 41.808506] ? find_held_lock+0x39/0x1d0 [ 41.812551] ? lock_downgrade+0x990/0x990 [ 41.816670] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 41.821838] ? ip_route_output_key_hash+0x1a6/0x370 [ 41.826839] ? lock_release+0xd70/0xd70 [ 41.830789] ? selinux_nf_register+0x30/0x30 [ 41.835172] ? __lock_acquire+0x732/0x4620 [ 41.839391] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 41.844650] ? ip_route_output_key_hash+0x252/0x370 [ 41.849642] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 41.855161] xfrm_lookup_route+0x39/0x1a0 [ 41.859286] ip_route_output_flow+0x7c/0xa0 [ 41.863584] inet_csk_route_req+0x5d8/0x990 [ 41.867885] tcp_v4_send_synack+0x1e4/0x270 [ 41.872178] ? tcp_v4_send_check+0x90/0x90 [ 41.876391] ? sk_filter_trim_cap+0x12f/0x9b0 [ 41.880854] ? prandom_u32_state+0x13/0x180 [ 41.885152] tcp_rtx_synack+0x119/0x2e0 [ 41.889101] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 41.894003] ? __lock_is_held+0xbc/0x140 [ 41.898047] inet_rtx_syn_ack+0x64/0xd0 [ 41.901993] tcp_check_req+0xaf5/0x1630 [ 41.905947] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 41.910672] ? refcount_inc_not_zero+0xfe/0x180 [ 41.915308] ? refcount_add+0x60/0x60 [ 41.919081] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 41.923825] ? tcp_filter+0x111/0x160 [ 41.927600] tcp_v4_rcv+0x17b0/0x2f20 [ 41.931375] ? lock_acquire+0x1d5/0x580 [ 41.935339] ? tcp_v4_early_demux+0xa30/0xa30 [ 41.939817] ip_local_deliver_finish+0x2e2/0xba0 [ 41.944549] ? inet_del_offload+0x40/0x40 [ 41.948670] ? nf_hook_slow+0xd3/0x1a0 [ 41.952534] ip_local_deliver+0x1ce/0x6e0 [ 41.956658] ? ip_call_ra_chain+0x6d0/0x6d0 [ 41.960961] ? inet_del_offload+0x40/0x40 [ 41.965089] ip_rcv_finish+0x8db/0x19c0 [ 41.969043] ? ip_local_deliver_finish+0xba0/0xba0 [ 41.973954] ? iptable_nat_ipv4_fn+0x40/0x40 [ 41.978346] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 41.982815] ? ip_rcv+0xba0/0x17d0 [ 41.986329] ? tcp_v4_send_synack+0x270/0x270 [ 41.990800] ? nf_nat_ipv4_in+0x1cd/0x270 [ 41.994919] ? iptable_nat_ipv4_fn+0x40/0x40 [ 41.999306] ? nf_hook_slow+0xd3/0x1a0 [ 42.003172] ip_rcv+0xc3f/0x17d0 [ 42.006518] ? ip_local_deliver+0x6e0/0x6e0 [ 42.010816] ? __lock_acquire+0x732/0x4620 [ 42.015023] ? print_usage_bug+0x480/0x480 [ 42.019245] ? ip_local_deliver_finish+0xba0/0xba0 [ 42.024156] ? ip_local_deliver+0x6e0/0x6e0 [ 42.028456] __netif_receive_skb_core+0x19af/0x33d0 [ 42.033445] ? print_usage_bug+0x480/0x480 [ 42.037666] ? nf_ingress+0x9f0/0x9f0 [ 42.041438] ? kasan_kmalloc+0xad/0xe0 [ 42.045298] ? kmem_cache_alloc+0x12e/0x760 [ 42.049593] ? __build_skb+0x9d/0x450 [ 42.053365] ? build_skb+0x6f/0x260 [ 42.056963] ? tun_build_skb.isra.42+0x92f/0x1690 [ 42.061774] ? tun_get_user+0x1dad/0x2150 [ 42.065891] ? tun_chr_write_iter+0xde/0x190 [ 42.070273] ? __vfs_write+0x68a/0x970 [ 42.074131] ? __skb_flow_get_ports+0x151/0x400 [ 42.078771] ? skb_flow_dissector_init+0x280/0x280 [ 42.083683] ? check_noncircular+0x20/0x20 [ 42.087891] ? __skb_flow_get_ports+0x151/0x400 [ 42.092536] ? __skb_flow_dissect+0x85b/0x3bc0 [ 42.097105] ? find_held_lock+0x39/0x1d0 [ 42.101157] ? lock_downgrade+0x990/0x990 [ 42.105279] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 42.110442] ? lock_acquire+0x1d5/0x580 [ 42.114386] ? netif_receive_skb_internal+0x1d7/0x670 [ 42.119560] ? pvclock_read_flags+0x160/0x160 [ 42.124024] ? tun_build_skb.isra.42+0x455/0x1690 [ 42.128845] ? lock_acquire+0x1d5/0x580 [ 42.132790] ? netif_receive_skb_internal+0xa2/0x670 [ 42.137865] ? ktime_get_with_offset+0x2c1/0x420 [ 42.142595] ? lock_release+0xd70/0xd70 [ 42.146539] ? ktime_get+0x3a0/0x3a0 [ 42.150236] ? skb_put+0x149/0x1c0 [ 42.153769] __netif_receive_skb+0x2c/0x1b0 [ 42.158059] ? __netif_receive_skb+0x2c/0x1b0 [ 42.162527] netif_receive_skb_internal+0x10b/0x670 [ 42.167511] ? dev_cpu_dead+0xb00/0xb00 [ 42.171465] ? rcu_pm_notify+0xc0/0xc0 [ 42.175335] netif_receive_skb+0xae/0x390 [ 42.179452] ? netif_receive_skb_internal+0x670/0x670 [ 42.184618] ? lock_downgrade+0x990/0x990 [ 42.188740] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 42.193555] tun_rx_batched.isra.43+0x5ed/0x860 [ 42.198195] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 42.202843] ? tun_sock_write_space+0x370/0x370 [ 42.207499] tun_get_user+0x11dd/0x2150 [ 42.211458] ? tun_build_skb.isra.42+0x1690/0x1690 [ 42.216368] ? lock_release+0xd70/0xd70 [ 42.220318] ? tun_chr_close+0x60/0x60 [ 42.224183] ? lock_release+0xd70/0xd70 [ 42.228131] ? __lock_is_held+0xbc/0x140 [ 42.232193] ? __tun_get+0x1d4/0x2e0 [ 42.235877] ? tun_chr_close+0x60/0x60 [ 42.239733] ? __handle_mm_fault+0x587/0x39c0 [ 42.244210] tun_chr_write_iter+0xde/0x190 [ 42.248434] __vfs_write+0x68a/0x970 [ 42.252124] ? kernel_read+0x120/0x120 [ 42.255994] ? avc_policy_seqno+0x9/0x20 [ 42.260029] ? selinux_file_permission+0x82/0x460 [ 42.264856] ? rw_verify_area+0xe5/0x2b0 [ 42.268889] ? __fdget_raw+0x20/0x20 [ 42.272578] vfs_write+0x18f/0x510 [ 42.276097] SyS_write+0xef/0x220 [ 42.279524] ? SyS_read+0x220/0x220 [ 42.283129] ? do_fast_syscall_32+0x158/0xeed [ 42.287599] ? SyS_read+0x220/0x220 [ 42.291197] do_fast_syscall_32+0x3f2/0xeed [ 42.295497] ? do_int80_syscall_32+0x930/0x930 [ 42.300064] ? lockdep_sys_exit+0x47/0xf0 [ 42.304186] ? syscall_return_slowpath+0x2b3/0x500 [ 42.309087] ? finish_task_switch+0x1aa/0x740 [ 42.313557] ? lockdep_sys_exit+0x47/0xf0 [ 42.317678] ? retint_user+0x18/0x20 [ 42.321368] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.326188] entry_SYSENTER_compat+0x51/0x60 [ 42.330565] RIP: 0023:0xf7feec79 [ 42.333901] RSP: 002b:00000000f2fe01f4 EFLAGS: 00000292 ORIG_RAX: 0000000000000004 [ 42.341583] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020002000 [ 42.348825] RDX: 0000000000000036 RSI: 0000000000000000 RDI: 00000000003d0f00 [ 42.356068] RBP: 00000000f2fe02e8 R08: 0000000000000000 R09: 0000000000000000 [ 42.363319] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 42.370570] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 42.377831] [ 42.379429] The buggy address belongs to the page: [ 42.384331] page:ffffea000734e180 count:0 mapcount:0 mapping: (null) index:0xffff8801cd386e40 [ 42.393750] flags: 0x200000000000000() [ 42.397612] raw: 0200000000000000 0000000000000000 ffff8801cd386e40 00000000ffffffff [ 42.405462] raw: 0000000000000000 dead000000000200 0000000000000000 0000000000000000 [ 42.413318] page dumped because: kasan: bad access detected [ 42.418996] [ 42.420594] Memory state around the buggy address: [ 42.425502] ffff8801cd386600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.432839] ffff8801cd386680: 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 [ 42.440171] >ffff8801cd386700: 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 f1 f1 [ 42.447500] ^ [ 42.451096] ffff8801cd386780: f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 f3 f3 [ 42.458428] ffff8801cd386800: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 42.465762] ==================================================================