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.15.223' (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: [ 34.913961] ================================================================== [ 34.915104] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 34.916063] Read of size 4 at addr ffff8801cd5c6898 by task syzkaller998228/3024 [ 34.917052] [ 34.917288] CPU: 1 PID: 3024 Comm: syzkaller998228 Not tainted 4.13.0-mm1+ #6 [ 34.918246] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.919469] Call Trace: [ 34.919832] dump_stack+0x194/0x257 [ 34.920329] ? arch_local_irq_restore+0x53/0x53 [ 34.920956] ? show_regs_print_info+0x65/0x65 [ 34.921564] ? lock_release+0xd70/0xd70 [ 34.922112] ? print_usage_bug+0x480/0x480 [ 34.922698] ? xfrm_state_find+0x305b/0x3190 [ 34.923293] print_address_description+0x73/0x250 [ 34.923951] ? xfrm_state_find+0x305b/0x3190 [ 34.924544] kasan_report+0x24e/0x340 [ 34.925063] __asan_report_load4_noabort+0x14/0x20 [ 34.925722] xfrm_state_find+0x305b/0x3190 [ 34.926315] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 34.926997] ? print_usage_bug+0x480/0x480 [ 34.927576] ? __lock_acquire+0x732/0x4620 [ 34.928166] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 34.928871] ? __lock_acquire+0x732/0x4620 [ 34.929451] ? __lock_acquire+0x732/0x4620 [ 34.930029] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 34.930732] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 34.931447] ? check_noncircular+0x20/0x20 [ 34.932050] ? check_noncircular+0x20/0x20 [ 34.932636] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 34.933225] ? __xfrm_decode_session+0x100/0x100 [ 34.933869] ? rcu_read_lock_sched_held+0x108/0x120 [ 34.937284] ? fib_table_lookup+0xa07/0x1a30 [ 34.941670] ? check_noncircular+0x20/0x20 [ 34.945886] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 34.951309] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 34.956315] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 34.960701] ? lock_downgrade+0x990/0x990 [ 34.964832] ? xfrm_selector_match+0xe00/0xe00 [ 34.969385] ? rcu_read_lock_held+0xa9/0xc0 [ 34.973683] ? find_exception+0x3aa/0x520 [ 34.977807] ? lock_release+0xd70/0xd70 [ 34.981759] ? refcount_inc_not_zero+0xfe/0x180 [ 34.986406] ? xfrm_selector_match+0x3b/0xe00 [ 34.990876] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 34.995609] ? xfrm_selector_match+0xe00/0xe00 [ 35.000167] ? check_noncircular+0x20/0x20 [ 35.004371] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 35.009800] xfrm_lookup+0xf0a/0x2540 [ 35.013572] ? xfrm_lookup+0xf0a/0x2540 [ 35.017520] ? ip_route_input_noref+0x1e0/0x1e0 [ 35.022167] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 35.028546] ? find_held_lock+0x39/0x1d0 [ 35.032590] ? lock_downgrade+0x990/0x990 [ 35.036712] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 35.041879] ? ip_route_output_key_hash+0x1a6/0x370 [ 35.046873] ? lock_release+0xd70/0xd70 [ 35.050821] ? selinux_nf_register+0x30/0x30 [ 35.055198] ? __lock_acquire+0x732/0x4620 [ 35.059411] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 35.064663] ? ip_route_output_key_hash+0x252/0x370 [ 35.069651] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 35.075168] xfrm_lookup_route+0x39/0x1a0 [ 35.079289] ip_route_output_flow+0x7c/0xa0 [ 35.083584] inet_csk_route_req+0x5d8/0x990 [ 35.087884] tcp_v4_send_synack+0x1e4/0x270 [ 35.092178] ? tcp_v4_send_check+0x90/0x90 [ 35.096392] ? sk_filter_trim_cap+0x12f/0x9b0 [ 35.100861] ? prandom_u32_state+0x13/0x180 [ 35.105162] tcp_rtx_synack+0x119/0x2e0 [ 35.109108] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 35.114010] ? tcp_parse_fastopen_option+0xc1/0xf0 [ 35.118914] ? tcp_parse_options+0x188/0xa10 [ 35.123301] inet_rtx_syn_ack+0x64/0xd0 [ 35.127247] tcp_check_req+0xaf5/0x1630 [ 35.131202] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 35.135931] ? refcount_inc_not_zero+0xfe/0x180 [ 35.140573] ? refcount_add+0x60/0x60 [ 35.144342] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 35.149074] ? tcp_filter+0x111/0x160 [ 35.152850] tcp_v4_rcv+0x17b0/0x2f20 [ 35.156626] ? lock_acquire+0x1d5/0x580 [ 35.160589] ? tcp_v4_early_demux+0xa30/0xa30 [ 35.165066] ip_local_deliver_finish+0x2e2/0xba0 [ 35.169799] ? inet_del_offload+0x40/0x40 [ 35.173922] ? nf_hook_slow+0xd3/0x1a0 [ 35.177788] ip_local_deliver+0x1ce/0x6e0 [ 35.181911] ? ip_call_ra_chain+0x6d0/0x6d0 [ 35.186251] ? inet_del_offload+0x40/0x40 [ 35.190380] ip_rcv_finish+0x8db/0x19c0 [ 35.194335] ? ip_local_deliver_finish+0xba0/0xba0 [ 35.199235] ? iptable_nat_ipv4_fn+0x40/0x40 [ 35.203621] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 35.208088] ? ip_rcv+0xbb0/0x17d0 [ 35.211604] ? find_held_lock+0x39/0x1d0 [ 35.215641] ? tcp_v4_send_synack+0x270/0x270 [ 35.220111] ? nf_nat_ipv4_in+0x1cd/0x270 [ 35.224227] ? iptable_nat_ipv4_fn+0x40/0x40 [ 35.228619] ? nf_hook_slow+0xd3/0x1a0 [ 35.232483] ip_rcv+0xc3f/0x17d0 [ 35.235830] ? ip_local_deliver+0x6e0/0x6e0 [ 35.240126] ? __lock_acquire+0x732/0x4620 [ 35.244343] ? ip_local_deliver_finish+0xba0/0xba0 [ 35.249247] ? ip_local_deliver+0x6e0/0x6e0 [ 35.253543] __netif_receive_skb_core+0x19af/0x33d0 [ 35.258529] ? print_usage_bug+0x480/0x480 [ 35.262749] ? nf_ingress+0x9f0/0x9f0 [ 35.266521] ? save_stack+0x43/0xd0 [ 35.270121] ? kasan_slab_alloc+0x12/0x20 [ 35.274248] ? kmem_cache_alloc+0x12e/0x760 [ 35.278545] ? __build_skb+0x9d/0x450 [ 35.282316] ? build_skb+0x6f/0x260 [ 35.285914] ? tun_build_skb.isra.42+0x92f/0x1690 [ 35.290729] ? tun_get_user+0x1dad/0x2150 [ 35.294847] ? tun_chr_write_iter+0xde/0x190 [ 35.299227] ? vfs_write+0x18f/0x510 [ 35.302913] ? __skb_flow_get_ports+0x151/0x400 [ 35.307555] ? skb_flow_dissector_init+0x280/0x280 [ 35.312459] ? check_noncircular+0x20/0x20 [ 35.316666] ? __skb_flow_get_ports+0x151/0x400 [ 35.321316] ? __skb_flow_dissect+0x85b/0x3bc0 [ 35.325877] ? print_usage_bug+0x480/0x480 [ 35.330098] ? find_held_lock+0x39/0x1d0 [ 35.334142] ? lock_downgrade+0x990/0x990 [ 35.338263] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 35.343429] ? netif_receive_skb_internal+0x1d7/0x670 [ 35.348612] ? pvclock_read_flags+0x160/0x160 [ 35.353077] ? tun_build_skb.isra.42+0x455/0x1690 [ 35.357904] ? lock_acquire+0x1d5/0x580 [ 35.361851] ? netif_receive_skb_internal+0xa2/0x670 [ 35.366937] ? ktime_get_with_offset+0x2c1/0x420 [ 35.371673] ? lock_release+0xd70/0xd70 [ 35.375617] ? ktime_get+0x3a0/0x3a0 [ 35.379304] ? skb_put+0x149/0x1c0 [ 35.382827] __netif_receive_skb+0x2c/0x1b0 [ 35.387121] ? __netif_receive_skb+0x2c/0x1b0 [ 35.391612] netif_receive_skb_internal+0x10b/0x670 [ 35.396605] ? dev_cpu_dead+0xb00/0xb00 [ 35.400551] ? save_stack_trace+0x16/0x20 [ 35.404669] ? __lock_acquire+0x20fd/0x4620 [ 35.408967] ? is_bpf_text_address+0xa4/0x120 [ 35.413436] ? rcu_pm_notify+0xc0/0xc0 [ 35.417299] ? unwind_get_return_address+0x61/0xa0 [ 35.422210] netif_receive_skb+0xae/0x390 [ 35.426330] ? netif_receive_skb_internal+0x670/0x670 [ 35.431499] ? lock_downgrade+0x990/0x990 [ 35.435623] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 35.440441] tun_rx_batched.isra.43+0x5ed/0x860 [ 35.445081] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 35.449724] ? tun_sock_write_space+0x370/0x370 [ 35.454382] tun_get_user+0x11dd/0x2150 [ 35.458344] ? tun_build_skb.isra.42+0x1690/0x1690 [ 35.463248] ? lock_release+0xd70/0xd70 [ 35.467200] ? tun_chr_close+0x60/0x60 [ 35.471066] ? lock_release+0xd70/0xd70 [ 35.475016] ? __lock_is_held+0xbc/0x140 [ 35.479060] ? __tun_get+0x1d4/0x2e0 [ 35.482745] ? tun_chr_close+0x60/0x60 [ 35.486617] tun_chr_write_iter+0xde/0x190 [ 35.490828] __vfs_write+0x68a/0x970 [ 35.494518] ? kernel_read+0x120/0x120 [ 35.498386] ? avc_policy_seqno+0x9/0x20 [ 35.502419] ? selinux_file_permission+0x82/0x460 [ 35.507243] ? rw_verify_area+0xe5/0x2b0 [ 35.511275] ? __fdget_raw+0x20/0x20 [ 35.514963] vfs_write+0x18f/0x510 [ 35.518482] SyS_write+0xef/0x220 [ 35.521911] ? SyS_read+0x220/0x220 [ 35.525510] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.530499] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.535609] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.540334] RIP: 0033:0x405b81 [ 35.543495] RSP: 002b:00007f3b7996fd90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 35.551174] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b81 [ 35.558416] RDX: 0000000000000046 RSI: 0000000020002000 RDI: 0000000000000003 [ 35.565658] RBP: 0000000000000082 R08: 0000000000000013 R09: 00007f3b79970700 [ 35.572899] R10: 00007f3b799709d0 R11: 0000000000000293 R12: 0000000000000000 [ 35.580138] R13: 00007ffd1b212c2f R14: 00007f3b799709c0 R15: 0000000000000000 [ 35.587397] [ 35.588996] The buggy address belongs to the page: [ 35.593897] page:ffffea0007357180 count:0 mapcount:0 mapping: (null) index:0xffff8801cd5c6c00 [ 35.603314] flags: 0x200000000000000() [ 35.607171] raw: 0200000000000000 0000000000000000 ffff8801cd5c6c00 00000000ffffffff [ 35.615021] raw: dead000000000100 dead000000000200 0000000000000000 0000000000000000 [ 35.622868] page dumped because: kasan: bad access detected [ 35.628545] [ 35.630141] Memory state around the buggy address: [ 35.635040] ffff8801cd5c6780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 35.642368] ffff8801cd5c6800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 35.649697] >ffff8801cd5c6880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 35.657025] ^ [ 35.661141] ffff8801cd5c6900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 [ 35.668467] ffff8801cd5c6980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 35.675794] ================================================================== [ 35.683119] Disabling lock debugging due to kernel taint [ 35.688576] Kernel panic - not syncing: panic_on_warn set ... [ 35.688576] [ 35.695905] CPU: 1 PID: 3024 Comm: syzkaller998228 Tainted: G B 4.13.0-mm1+ #6 [ 35.704357] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.713675] Call Trace: [ 35.716230] dump_stack+0x194/0x257 [ 35.719825] ? arch_local_irq_restore+0x53/0x53 [ 35.724463] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.729195] ? xfrm_state_find+0x2fe0/0x3190 [ 35.733573] panic+0x1e4/0x417 [ 35.736736] ? __warn+0x1d9/0x1d9 [ 35.740160] ? xfrm_state_find+0x305b/0x3190 [ 35.744535] kasan_end_report+0x50/0x50 [ 35.748473] kasan_report+0x137/0x340 [ 35.752239] __asan_report_load4_noabort+0x14/0x20 [ 35.757131] xfrm_state_find+0x305b/0x3190 [ 35.761341] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 35.766409] ? print_usage_bug+0x480/0x480 [ 35.770610] ? __lock_acquire+0x732/0x4620 [ 35.774819] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 35.779978] ? __lock_acquire+0x732/0x4620 [ 35.784181] ? __lock_acquire+0x732/0x4620 [ 35.788383] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 35.793551] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 35.798722] ? check_noncircular+0x20/0x20 [ 35.802920] ? check_noncircular+0x20/0x20 [ 35.807126] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 35.811336] ? __xfrm_decode_session+0x100/0x100 [ 35.816059] ? rcu_read_lock_sched_held+0x108/0x120 [ 35.821042] ? fib_table_lookup+0xa07/0x1a30 [ 35.825419] ? check_noncircular+0x20/0x20 [ 35.829626] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 35.835041] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 35.840030] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 35.844404] ? lock_downgrade+0x990/0x990 [ 35.848528] ? xfrm_selector_match+0xe00/0xe00 [ 35.853075] ? rcu_read_lock_held+0xa9/0xc0 [ 35.857361] ? find_exception+0x3aa/0x520 [ 35.861474] ? lock_release+0xd70/0xd70 [ 35.865416] ? refcount_inc_not_zero+0xfe/0x180 [ 35.870052] ? xfrm_selector_match+0x3b/0xe00 [ 35.874515] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 35.879239] ? xfrm_selector_match+0xe00/0xe00 [ 35.883787] ? check_noncircular+0x20/0x20 [ 35.887985] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 35.893403] xfrm_lookup+0xf0a/0x2540 [ 35.897255] ? xfrm_lookup+0xf0a/0x2540 [ 35.901193] ? ip_route_input_noref+0x1e0/0x1e0 [ 35.905830] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 35.912201] ? find_held_lock+0x39/0x1d0