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-5,10.128.0.12' (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.243080] ================================================================== [ 41.244277] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x303d/0x3170 [ 41.245261] Read of size 4 at addr ffff8801d31865e8 by task syzkaller442189/2950 [ 41.246319] [ 41.246552] CPU: 1 PID: 2950 Comm: syzkaller442189 Not tainted 4.13.0-rc4+ #28 [ 41.247698] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.248963] Call Trace: [ 41.249337] dump_stack+0x194/0x257 [ 41.249933] ? arch_local_irq_restore+0x53/0x53 [ 41.250621] ? show_regs_print_info+0x65/0x65 [ 41.251305] ? lock_release+0xa40/0xa40 [ 41.251844] ? xfrm_state_find+0x303d/0x3170 [ 41.252436] print_address_description+0x7f/0x260 [ 41.253084] ? xfrm_state_find+0x303d/0x3170 [ 41.253742] kasan_report+0x24e/0x340 [ 41.254326] __asan_report_load4_noabort+0x14/0x20 [ 41.255050] xfrm_state_find+0x303d/0x3170 [ 41.255688] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 41.256422] ? __lock_acquire+0x6ef/0x3dc0 [ 41.257084] ? print_usage_bug+0x480/0x480 [ 41.257745] ? check_noncircular+0x20/0x20 [ 41.258423] ? check_noncircular+0x20/0x20 [ 41.259066] ? __lock_acquire+0x6ef/0x3dc0 [ 41.259696] ? print_usage_bug+0x480/0x480 [ 41.260306] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 41.261059] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.261730] ? fib_table_lookup+0xa07/0x1a30 [ 41.262389] xfrm_tmpl_resolve+0x309/0xbf0 [ 41.263023] ? __xfrm_dst_lookup+0x120/0x120 [ 41.264804] ? __lock_is_held+0xb6/0x140 [ 41.268851] ? check_noncircular+0x20/0x20 [ 41.273059] ? check_noncircular+0x20/0x20 [ 41.277284] ? rcu_read_lock_held+0xa9/0xc0 [ 41.281583] ? find_exception+0x3aa/0x520 [ 41.285711] xfrm_resolve_and_create_bundle+0x102/0x2080 [ 41.291132] ? lock_downgrade+0x990/0x990 [ 41.295269] ? __xfrm_decode_session+0x100/0x100 [ 41.300002] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 41.304735] ? lock_downgrade+0x990/0x990 [ 41.308854] ? lock_release+0xa40/0xa40 [ 41.312804] ? refcount_inc_not_zero+0xfe/0x180 [ 41.317452] ? xfrm_selector_match+0x3b/0xe00 [ 41.321926] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 41.326660] ? xfrm_selector_match+0xe00/0xe00 [ 41.331222] xfrm_lookup+0xd39/0x11c0 [ 41.335023] ? xfrm_lookup+0xd39/0x11c0 [ 41.338986] ? xfrm_sk_policy_lookup+0x3d0/0x3d0 [ 41.343715] ? lock_release+0xa40/0xa40 [ 41.347675] ? ip_route_output_key_hash+0x252/0x370 [ 41.352663] ? ip_route_output_key_hash_rcu+0x2bb0/0x2bb0 [ 41.358181] xfrm_lookup_route+0x39/0x1a0 [ 41.362316] ip_route_output_flow+0x7c/0xa0 [ 41.366627] inet_csk_route_req+0x5d8/0x990 [ 41.370929] tcp_v4_send_synack+0x1e4/0x270 [ 41.375224] ? tcp_v4_send_check+0x90/0x90 [ 41.379437] ? prandom_u32_state+0x13/0x180 [ 41.383731] tcp_rtx_synack+0x119/0x2e0 [ 41.387677] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 41.392576] ? tcp_parse_fastopen_option+0xc1/0xf0 [ 41.397476] ? tcp_parse_options+0x188/0xa10 [ 41.401859] inet_rtx_syn_ack+0x64/0xd0 [ 41.405807] tcp_check_req+0xae3/0x1620 [ 41.409753] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 41.414481] ? refcount_inc_not_zero+0xfe/0x180 [ 41.419118] ? refcount_add+0x60/0x60 [ 41.422890] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 41.427618] ? check_noncircular+0x20/0x20 [ 41.431836] tcp_v4_rcv+0x168e/0x2df0 [ 41.435608] ? lock_acquire+0x1d5/0x580 [ 41.439548] ? lock_acquire+0x1d5/0x580 [ 41.443506] ? tcp_v4_early_demux+0xa30/0xa30 [ 41.447982] ip_local_deliver_finish+0x2e2/0xba0 [ 41.452715] ? inet_del_offload+0x40/0x40 [ 41.456851] ip_local_deliver+0x1ce/0x6d0 [ 41.460969] ? ip_call_ra_chain+0x6d0/0x6d0 [ 41.465267] ? inet_del_offload+0x40/0x40 [ 41.469394] ip_rcv_finish+0x8db/0x19c0 [ 41.473345] ? iptable_nat_ipv4_fn+0x40/0x40 [ 41.477747] ? ip_local_deliver_finish+0xba0/0xba0 [ 41.482655] ? ip_rcv+0xf05/0x17d0 [ 41.486164] ? lock_downgrade+0x990/0x990 [ 41.490282] ? tcp_v4_send_synack+0x270/0x270 [ 41.494757] ? rcu_read_lock_held+0xa9/0xc0 [ 41.499072] ? nf_hook_slow+0x12d/0x290 [ 41.503039] ip_rcv+0xc3f/0x17d0 [ 41.506397] ? ip_local_deliver+0x6d0/0x6d0 [ 41.510719] ? ip_local_deliver_finish+0xba0/0xba0 [ 41.515627] ? ip_local_deliver+0x6d0/0x6d0 [ 41.519925] __netif_receive_skb_core+0x1b05/0x3230 [ 41.524923] ? nf_ingress+0x980/0x980 [ 41.528690] ? print_usage_bug+0x480/0x480 [ 41.532894] ? lock_downgrade+0x990/0x990 [ 41.537022] ? __free_insn_slot+0x5c0/0x5c0 [ 41.541320] ? unwind_get_return_address+0x61/0xa0 [ 41.546224] ? is_bpf_text_address+0xa4/0x120 [ 41.550690] ? check_noncircular+0x20/0x20 [ 41.554895] ? unwind_get_return_address+0x61/0xa0 [ 41.559796] ? __save_stack_trace+0x7e/0xd0 [ 41.564089] ? depot_save_stack+0x12c/0x490 [ 41.568394] ? find_held_lock+0x35/0x1d0 [ 41.572432] ? lock_downgrade+0x990/0x990 [ 41.576552] ? __skb_flow_get_ports+0x151/0x400 [ 41.581209] ? pvclock_read_flags+0x160/0x160 [ 41.585679] ? lock_acquire+0x1d5/0x580 [ 41.589630] ? lock_acquire+0x1d5/0x580 [ 41.593576] ? netif_receive_skb_internal+0xf1/0x1a50 [ 41.598736] ? ktime_get_with_offset+0x2c1/0x420 [ 41.603467] ? lock_release+0xa40/0xa40 [ 41.607410] ? do_gettimeofday+0x190/0x190 [ 41.611625] ? netif_receive_skb_internal+0xf1/0x1a50 [ 41.616791] __netif_receive_skb+0x2c/0x1b0 [ 41.621114] ? __netif_receive_skb+0x2c/0x1b0 [ 41.625584] ? netif_receive_skb_internal+0xf1/0x1a50 [ 41.630747] netif_receive_skb_internal+0x16a/0x1a50 [ 41.635827] ? __alloc_skb+0x548/0x740 [ 41.639690] ? dev_queue_xmit_accel+0x30/0x30 [ 41.644180] ? find_held_lock+0x35/0x1d0 [ 41.648222] ? __might_fault+0x110/0x1d0 [ 41.652252] ? lock_downgrade+0x990/0x990 [ 41.656371] ? lock_release+0xa40/0xa40 [ 41.660330] ? check_same_owner+0x320/0x320 [ 41.664624] ? rcu_pm_notify+0xc0/0xc0 [ 41.668505] netif_receive_skb+0xae/0x390 [ 41.672638] ? netif_receive_skb_internal+0x1a50/0x1a50 [ 41.677990] ? _copy_from_iter+0x367/0xf30 [ 41.682198] ? __check_object_size+0x268/0x500 [ 41.686766] ? tun_rx_batched.isra.42+0x5bd/0x860 [ 41.691584] tun_rx_batched.isra.42+0x5e7/0x860 [ 41.696230] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 41.700876] ? tun_sock_write_space+0x370/0x370 [ 41.705517] ? tun_free_netdev+0x1b0/0x1b0 [ 41.709737] tun_get_user+0xde5/0x2910 [ 41.713607] ? tun_chr_ioctl+0x40/0x40 [ 41.717492] ? find_held_lock+0x35/0x1d0 [ 41.721536] ? __fget+0x333/0x570 [ 41.725031] ? find_held_lock+0x35/0x1d0 [ 41.729075] ? __tun_get+0x1ab/0x2e0 [ 41.732759] ? lock_downgrade+0x990/0x990 [ 41.736887] ? lock_release+0xa40/0xa40 [ 41.740842] ? __lock_is_held+0xb6/0x140 [ 41.744887] ? __tun_get+0x1d4/0x2e0 [ 41.748569] ? tun_chr_close+0x60/0x60 [ 41.752439] tun_chr_write_iter+0xd8/0x190 [ 41.756656] __vfs_write+0x684/0x970 [ 41.760346] ? default_llseek+0x290/0x290 [ 41.764475] ? finish_task_switch+0x1d3/0x740 [ 41.768951] ? avc_policy_seqno+0x9/0x20 [ 41.772989] ? selinux_file_permission+0x82/0x460 [ 41.777814] ? rw_verify_area+0xe5/0x2b0 [ 41.781843] ? __fdget_raw+0x20/0x20 [ 41.785525] vfs_write+0x189/0x510 [ 41.789042] SyS_write+0xef/0x220 [ 41.792464] ? SyS_read+0x220/0x220 [ 41.796061] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.801056] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.805792] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.810514] RIP: 0033:0x405b81 [ 41.813672] RSP: 002b:00007fd85fb67d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 41.821349] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b81 [ 41.828586] RDX: 0000000000000046 RSI: 0000000020002000 RDI: 0000000000000003 [ 41.835826] RBP: 0000000000000086 R08: 0000000000000013 R09: 00007fd85fb68700 [ 41.843068] R10: 00007fd85fb689d0 R11: 0000000000000293 R12: 0000000000000000 [ 41.850305] R13: 00007fffeaa10bef R14: 00007fd85fb689c0 R15: 0000000000000000 [ 41.857562] [ 41.859156] The buggy address belongs to the page: [ 41.864058] page:ffffea000662d550 count:0 mapcount:0 mapping: (null) index:0xffff8801d3186700 [ 41.873482] flags: 0x200000000000000() [ 41.877345] raw: 0200000000000000 0000000000000000 ffff8801d3186700 00000000ffffffff [ 41.885193] raw: 0000000000000000 dead000000000200 0000000000000000 [ 41.891562] page dumped because: kasan: bad access detected [ 41.897239] [ 41.898831] Memory state around the buggy address: [ 41.903724] ffff8801d3186480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.911051] ffff8801d3186500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 41.918380] >ffff8801d3186580: 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f2 f3 f3 [ 41.925717] ^ [ 41.932441] ffff8801d3186600: f3 f3 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 [ 41.939772] ffff8801d3186680: 00 00 00 00 00 00 00 f2 f2 f3 f3 f3 f3 00 00 00 [ 41.947098] ================================================================== [ 41.954421] Disabling lock debugging due to kernel taint [ 41.959890] Kernel panic - not syncing: panic_on_warn set ... [ 41.959890] [ 41.967226] CPU: 1 PID: 2950 Comm: syzkaller442189 Tainted: G B 4.13.0-rc4+ #28 [ 41.975768] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.985088] Call Trace: [ 41.987652] dump_stack+0x194/0x257 [ 41.991247] ? arch_local_irq_restore+0x53/0x53 [ 41.995897] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.000647] ? xfrm_state_find+0x2f50/0x3170 [ 42.005034] panic+0x1e4/0x417 [ 42.008193] ? __warn+0x1d9/0x1d9 [ 42.011620] ? xfrm_state_find+0x303d/0x3170 [ 42.015998] kasan_end_report+0x50/0x50 [ 42.019941] kasan_report+0x137/0x340 [ 42.023712] __asan_report_load4_noabort+0x14/0x20 [ 42.028614] xfrm_state_find+0x303d/0x3170 [ 42.032828] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 42.037905] ? __lock_acquire+0x6ef/0x3dc0 [ 42.042107] ? print_usage_bug+0x480/0x480 [ 42.046316] ? check_noncircular+0x20/0x20 [ 42.050516] ? check_noncircular+0x20/0x20 [ 42.054720] ? __lock_acquire+0x6ef/0x3dc0 [ 42.058922] ? print_usage_bug+0x480/0x480 [ 42.063143] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 42.068302] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.073289] ? fib_table_lookup+0xa07/0x1a30 [ 42.077675] xfrm_tmpl_resolve+0x309/0xbf0 [ 42.081895] ? __xfrm_dst_lookup+0x120/0x120 [ 42.086277] ? __lock_is_held+0xb6/0x140 [ 42.090316] ? check_noncircular+0x20/0x20 [ 42.094527] ? check_noncircular+0x20/0x20 [ 42.098730] ? rcu_read_lock_held+0xa9/0xc0 [ 42.103042] ? find_exception+0x3aa/0x520 [ 42.107183] xfrm_resolve_and_create_bundle+0x102/0x2080 [ 42.112622] ? lock_downgrade+0x990/0x990 [ 42.116767] ? __xfrm_decode_session+0x100/0x100 [ 42.121503] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 42.126250] ? lock_downgrade+0x990/0x990 [ 42.130373] ? lock_release+0xa40/0xa40 [ 42.134314] ? refcount_inc_not_zero+0xfe/0x180 [ 42.138954] ? xfrm_selector_match+0x3b/0xe00 [ 42.143421] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 42.148152] ? xfrm_selector_match+0xe00/0xe00 [ 42.152707] xfrm_lookup+0xd39/0x11c0 [ 42.156473] ? xfrm_lookup+0xd39/0x11c0 [ 42.160415] ? xfrm_sk_policy_lookup+0x3d0/0x3d0 [ 42.165139] ? lock_release+0xa40/0xa40 [ 42.169089] ? ip_route_output_key_hash+0x252/0x370 [ 42.174074] ? ip_route_output_key_hash_rcu+0x2bb0/0x2bb0 [ 42.179584] xfrm_lookup_route+0x39/0x1a0 [ 42.183701] ip_route_output_flow+0x7c/0xa0 [ 42.187989] inet_csk_route_req+0x5d8/0x990 [ 42.192282] tcp_v4_send_synack+0x1e4/0x270 [ 42.196572] ? tcp_v4_send_check+0x90/0x90 [ 42.200779] ? prandom_u32_state+0x13/0x180 [ 42.205070] tcp_rtx_synack+0x119/0x2e0 [ 42.209008] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 42.213903] ? tcp_parse_fastopen_option+0xc1/0xf0 [ 42.218810] ? tcp_parse_options+0x188/0xa10 [ 42.223187] inet_rtx_syn_ack+0x64/0xd0 [ 42.227131] tcp_check_req+0xae3/0x1620 [ 42.231083] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 42.235813] ? refcount_inc_not_zero+0xfe/0x180 [ 42.240459] ? refcount_add+0x60/0x60