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-3,10.128.0.33' (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: [ 55.535639] ================================================================== [ 55.536738] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 55.537684] Read of size 4 at addr ffff8801cdf36898 by task syzkaller582375/3019 [ 55.538732] [ 55.538967] CPU: 1 PID: 3019 Comm: syzkaller582375 Not tainted 4.13.0-mm1+ #5 [ 55.539986] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 55.541208] Call Trace: [ 55.541571] dump_stack+0x194/0x257 [ 55.542069] ? arch_local_irq_restore+0x53/0x53 [ 55.542695] ? show_regs_print_info+0x65/0x65 [ 55.543301] ? lock_release+0xd70/0xd70 [ 55.543835] ? print_usage_bug+0x480/0x480 [ 55.544404] ? xfrm_state_find+0x305b/0x3190 [ 55.544997] print_address_description+0x73/0x250 [ 55.545643] ? xfrm_state_find+0x305b/0x3190 [ 55.546235] kasan_report+0x24e/0x340 [ 55.546800] __asan_report_load4_noabort+0x14/0x20 [ 55.547459] xfrm_state_find+0x305b/0x3190 [ 55.548050] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 55.548746] ? print_usage_bug+0x480/0x480 [ 55.549319] ? __lock_acquire+0x732/0x4620 [ 55.549908] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 55.550611] ? __lock_acquire+0x732/0x4620 [ 55.551224] ? __lock_acquire+0x732/0x4620 [ 55.551801] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 55.552505] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 55.553227] ? check_noncircular+0x20/0x20 [ 55.553795] ? check_noncircular+0x20/0x20 [ 55.554377] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 55.554965] ? __xfrm_decode_session+0x100/0x100 [ 55.555609] ? rcu_read_lock_sched_held+0x108/0x120 [ 55.556284] ? fib_table_lookup+0xa07/0x1a30 [ 55.560672] ? check_noncircular+0x20/0x20 [ 55.564891] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 55.570314] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 55.575317] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 55.579702] ? lock_downgrade+0x990/0x990 [ 55.583832] ? xfrm_selector_match+0xe00/0xe00 [ 55.588384] ? rcu_read_lock_held+0xa9/0xc0 [ 55.592675] ? find_exception+0x3aa/0x520 [ 55.596795] ? lock_release+0xd70/0xd70 [ 55.600757] ? refcount_inc_not_zero+0xfe/0x180 [ 55.605404] ? xfrm_selector_match+0x3b/0xe00 [ 55.609873] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 55.614605] ? xfrm_selector_match+0xe00/0xe00 [ 55.619159] ? check_noncircular+0x20/0x20 [ 55.623371] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 55.628797] xfrm_lookup+0xf0a/0x2540 [ 55.632572] ? xfrm_lookup+0xf0a/0x2540 [ 55.636521] ? ip_route_input_noref+0x1e0/0x1e0 [ 55.641168] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 55.647553] ? find_held_lock+0x39/0x1d0 [ 55.651596] ? lock_downgrade+0x990/0x990 [ 55.655718] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 55.660889] ? ip_route_output_key_hash+0x1a6/0x370 [ 55.665885] ? lock_release+0xd70/0xd70 [ 55.669833] ? selinux_nf_register+0x30/0x30 [ 55.674212] ? __lock_acquire+0x732/0x4620 [ 55.678426] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 55.683679] ? ip_route_output_key_hash+0x252/0x370 [ 55.688668] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 55.694185] xfrm_lookup_route+0x39/0x1a0 [ 55.698309] ip_route_output_flow+0x7c/0xa0 [ 55.702606] inet_csk_route_req+0x5d8/0x990 [ 55.706909] tcp_v4_send_synack+0x1e4/0x270 [ 55.711203] ? tcp_v4_send_check+0x90/0x90 [ 55.715415] ? sk_filter_trim_cap+0x12f/0x9b0 [ 55.719881] ? prandom_u32_state+0x13/0x180 [ 55.724178] tcp_rtx_synack+0x119/0x2e0 [ 55.728124] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 55.733036] ? __lock_is_held+0xbc/0x140 [ 55.737079] inet_rtx_syn_ack+0x64/0xd0 [ 55.741025] tcp_check_req+0xaf5/0x1630 [ 55.744982] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 55.749710] ? refcount_inc_not_zero+0xfe/0x180 [ 55.754348] ? refcount_add+0x60/0x60 [ 55.758117] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 55.762850] ? tcp_filter+0x111/0x160 [ 55.766628] tcp_v4_rcv+0x1f57/0x2f20 [ 55.770405] ? lock_acquire+0x1d5/0x580 [ 55.774365] ? tcp_v4_early_demux+0xa30/0xa30 [ 55.778841] ip_local_deliver_finish+0x2e2/0xba0 [ 55.783575] ? inet_del_offload+0x40/0x40 [ 55.787696] ? nf_hook_slow+0xd3/0x1a0 [ 55.791561] ip_local_deliver+0x1ce/0x6e0 [ 55.795688] ? ip_call_ra_chain+0x6d0/0x6d0 [ 55.799989] ? inet_del_offload+0x40/0x40 [ 55.804122] ip_rcv_finish+0x8db/0x19c0 [ 55.808073] ? ip_local_deliver_finish+0xba0/0xba0 [ 55.812972] ? iptable_nat_ipv4_fn+0x40/0x40 [ 55.817352] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 55.821818] ? ip_rcv+0xbe0/0x17d0 [ 55.825329] ? find_held_lock+0x39/0x1d0 [ 55.829360] ? tcp_v4_send_synack+0x270/0x270 [ 55.833827] ? nf_nat_ipv4_in+0x1cd/0x270 [ 55.837944] ? iptable_nat_ipv4_fn+0x40/0x40 [ 55.842333] ? nf_hook_slow+0xd3/0x1a0 [ 55.846197] ip_rcv+0xc3f/0x17d0 [ 55.849547] ? ip_local_deliver+0x6e0/0x6e0 [ 55.853843] ? __lock_acquire+0x732/0x4620 [ 55.858059] ? ip_local_deliver_finish+0xba0/0xba0 [ 55.862962] ? ip_local_deliver+0x6e0/0x6e0 [ 55.867263] __netif_receive_skb_core+0x19af/0x33d0 [ 55.872250] ? print_usage_bug+0x480/0x480 [ 55.876466] ? nf_ingress+0x9f0/0x9f0 [ 55.880237] ? save_stack+0x43/0xd0 [ 55.883835] ? kasan_slab_alloc+0x12/0x20 [ 55.887950] ? kmem_cache_alloc+0x12e/0x760 [ 55.892252] ? __build_skb+0x9d/0x450 [ 55.896023] ? build_skb+0x6f/0x260 [ 55.899622] ? tun_build_skb.isra.42+0x92f/0x1690 [ 55.904435] ? tun_get_user+0x1dad/0x2150 [ 55.908555] ? tun_chr_write_iter+0xde/0x190 [ 55.912940] ? vfs_write+0x18f/0x510 [ 55.916631] ? __skb_flow_get_ports+0x151/0x400 [ 55.921271] ? skb_flow_dissector_init+0x280/0x280 [ 55.926176] ? check_noncircular+0x20/0x20 [ 55.930380] ? __skb_flow_get_ports+0x151/0x400 [ 55.935023] ? __skb_flow_dissect+0x85b/0x3bc0 [ 55.939585] ? print_usage_bug+0x480/0x480 [ 55.943807] ? find_held_lock+0x39/0x1d0 [ 55.947851] ? lock_downgrade+0x990/0x990 [ 55.951970] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 55.957137] ? netif_receive_skb_internal+0x1d7/0x5e0 [ 55.962318] ? pvclock_read_flags+0x160/0x160 [ 55.966781] ? tun_build_skb.isra.42+0x455/0x1690 [ 55.971603] ? lock_acquire+0x1d5/0x580 [ 55.975547] ? netif_receive_skb_internal+0x93/0x5e0 [ 55.980626] ? ktime_get_with_offset+0x2c1/0x420 [ 55.985355] ? lock_release+0xd70/0xd70 [ 55.989299] ? ktime_get+0x3a0/0x3a0 [ 55.992983] ? skb_put+0x149/0x1c0 [ 55.996504] __netif_receive_skb+0x2c/0x1b0 [ 56.000800] ? __netif_receive_skb+0x2c/0x1b0 [ 56.005266] netif_receive_skb_internal+0x10b/0x5e0 [ 56.010252] ? __lru_cache_add+0x2a4/0x410 [ 56.014456] ? dev_cpu_dead+0xb00/0xb00 [ 56.018407] ? __pagevec_lru_add+0x30/0x30 [ 56.022616] ? get_mem_cgroup_from_mm+0x49b/0x710 [ 56.027429] ? rcu_pm_notify+0xc0/0xc0 [ 56.031304] netif_receive_skb+0xae/0x390 [ 56.035422] ? netif_receive_skb_internal+0x5e0/0x5e0 [ 56.040587] ? lock_downgrade+0x990/0x990 [ 56.044709] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 56.049529] tun_rx_batched.isra.43+0x5ed/0x860 [ 56.054176] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 56.058824] ? tun_sock_write_space+0x370/0x370 [ 56.063482] tun_get_user+0x11dd/0x2150 [ 56.067445] ? tun_build_skb.isra.42+0x1690/0x1690 [ 56.072345] ? lock_release+0xd70/0xd70 [ 56.076297] ? tun_chr_close+0x60/0x60 [ 56.080164] ? lock_release+0xd70/0xd70 [ 56.084112] ? __lock_is_held+0xbc/0x140 [ 56.088154] ? __tun_get+0x1d4/0x2e0 [ 56.091839] ? tun_chr_close+0x60/0x60 [ 56.095707] tun_chr_write_iter+0xde/0x190 [ 56.099916] __vfs_write+0x68a/0x970 [ 56.103606] ? default_llseek+0x2a0/0x2a0 [ 56.107738] ? avc_policy_seqno+0x9/0x20 [ 56.111774] ? selinux_file_permission+0x82/0x460 [ 56.116600] ? rw_verify_area+0xe5/0x2b0 [ 56.120633] ? __fdget_raw+0x20/0x20 [ 56.124327] vfs_write+0x18f/0x510 [ 56.127846] SyS_write+0xef/0x220 [ 56.131269] ? lockdep_sys_exit+0x47/0xf0 [ 56.135389] ? SyS_read+0x220/0x220 [ 56.138983] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 56.143982] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 56.148718] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 56.153441] RIP: 0033:0x405b91 [ 56.156605] RSP: 002b:00007f8af17c1d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 56.164287] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b91 [ 56.171527] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 56.178770] RBP: 0000000000000082 R08: 0000000000000013 R09: 00007f8af17c2700 [ 56.186009] R10: 00007f8af17c29d0 R11: 0000000000000293 R12: 0000000000000000 [ 56.193252] R13: 00007ffc6e5bf15f R14: 00007f8af17c29c0 R15: 0000000000000000 [ 56.200515] [ 56.202112] The buggy address belongs to the page: [ 56.207010] page:ffffea000737cd80 count:0 mapcount:0 mapping: (null) index:0xffff8801cdf361c0 [ 56.216433] flags: 0x200000000000000() [ 56.220290] raw: 0200000000000000 0000000000000000 ffff8801cdf361c0 00000000ffffffff [ 56.228140] raw: dead000000000100 dead000000000200 ffff8801dae08780 0000000000000000 [ 56.235990] page dumped because: kasan: bad access detected [ 56.241666] [ 56.243261] Memory state around the buggy address: [ 56.248157] ffff8801cdf36780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 56.255485] ffff8801cdf36800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 56.262816] >ffff8801cdf36880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 56.270142] ^ [ 56.274258] ffff8801cdf36900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 [ 56.281590] ffff8801cdf36980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 56.288916] ================================================================== [ 56.296241] Disabling lock debugging due to kernel taint [ 56.301696] Kernel panic - not syncing: panic_on_warn set ... [ 56.301696] [ 56.309024] CPU: 1 PID: 3019 Comm: syzkaller582375 Tainted: G B 4.13.0-mm1+ #5 [ 56.317477] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 56.326804] Call Trace: [ 56.329358] dump_stack+0x194/0x257 [ 56.332952] ? arch_local_irq_restore+0x53/0x53 [ 56.337587] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 56.342309] ? xfrm_state_find+0x2fb0/0x3190 [ 56.346681] panic+0x1e4/0x417 [ 56.349840] ? __warn+0x1d9/0x1d9 [ 56.353264] ? xfrm_state_find+0x305b/0x3190 [ 56.357639] kasan_end_report+0x50/0x50 [ 56.361577] kasan_report+0x137/0x340 [ 56.365344] __asan_report_load4_noabort+0x14/0x20 [ 56.370237] xfrm_state_find+0x305b/0x3190 [ 56.374445] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 56.379514] ? print_usage_bug+0x480/0x480 [ 56.383715] ? __lock_acquire+0x732/0x4620 [ 56.387924] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 56.393083] ? __lock_acquire+0x732/0x4620 [ 56.397289] ? __lock_acquire+0x732/0x4620 [ 56.401491] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 56.406649] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 56.411802] ? check_noncircular+0x20/0x20 [ 56.415998] ? check_noncircular+0x20/0x20 [ 56.420202] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 56.424411] ? __xfrm_decode_session+0x100/0x100 [ 56.429134] ? rcu_read_lock_sched_held+0x108/0x120 [ 56.434114] ? fib_table_lookup+0xa07/0x1a30 [ 56.438489] ? check_noncircular+0x20/0x20 [ 56.442694] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 56.448106] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 56.453092] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 56.457465] ? lock_downgrade+0x990/0x990 [ 56.461583] ? xfrm_selector_match+0xe00/0xe00 [ 56.466127] ? rcu_read_lock_held+0xa9/0xc0 [ 56.470412] ? find_exception+0x3aa/0x520 [ 56.474524] ? lock_release+0xd70/0xd70 [ 56.478465] ? refcount_inc_not_zero+0xfe/0x180 [ 56.483103] ? xfrm_selector_match+0x3b/0xe00 [ 56.487563] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 56.492283] ? xfrm_selector_match+0xe00/0xe00 [ 56.496829] ? check_noncircular+0x20/0x20 [ 56.501025] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 56.506440] xfrm_lookup+0xf0a/0x2540 [ 56.510205] ? xfrm_lookup+0xf0a/0x2540 [ 56.514143] ? ip_route_input_noref+0x1e0/0x1e0 [ 56.518788] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 56.525158] ? find_held_lock+0x39/0x1d0 [ 56.529191] ? lock_downgrade+0x990/0x990 [ 56.533303] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730