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-2,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.644592] ================================================================== [ 31.652058] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x305b/0x3190 [ 31.659244] Read of size 4 at addr ffff8801ce59e898 by task syzkaller929616/3015 [ 31.666763] [ 31.668373] CPU: 0 PID: 3015 Comm: syzkaller929616 Not tainted 4.13.0-mm1+ #5 [ 31.675653] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.685000] Call Trace: [ 31.687591] dump_stack+0x194/0x257 [ 31.691222] ? arch_local_irq_restore+0x53/0x53 [ 31.695880] ? show_regs_print_info+0x65/0x65 [ 31.700363] ? lock_release+0xd70/0xd70 [ 31.704321] ? xfrm_state_find+0x305b/0x3190 [ 31.708714] print_address_description+0x73/0x250 [ 31.713547] ? xfrm_state_find+0x305b/0x3190 [ 31.717944] kasan_report+0x24e/0x340 [ 31.721734] __asan_report_load4_noabort+0x14/0x20 [ 31.726643] xfrm_state_find+0x305b/0x3190 [ 31.730881] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 31.735968] ? print_usage_bug+0x480/0x480 [ 31.740192] ? __lock_acquire+0x732/0x4620 [ 31.744428] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.749610] ? __lock_acquire+0x732/0x4620 [ 31.753835] ? __lock_acquire+0x732/0x4620 [ 31.758067] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.763262] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 31.768441] ? check_noncircular+0x20/0x20 [ 31.772666] ? check_noncircular+0x20/0x20 [ 31.776894] xfrm_tmpl_resolve+0x2fb/0xbd0 [ 31.781162] ? __xfrm_decode_session+0x100/0x100 [ 31.785914] ? rcu_read_lock_sched_held+0x108/0x120 [ 31.790918] ? fib_table_lookup+0xa07/0x1a30 [ 31.795317] ? check_noncircular+0x20/0x20 [ 31.799546] xfrm_resolve_and_create_bundle+0x186/0x24b0 [ 31.804991] ? inet_netconf_get_devconf+0x4f0/0x4f0 [ 31.810035] ? xfrm_tmpl_resolve+0xbd0/0xbd0 [ 31.814437] ? lock_downgrade+0x990/0x990 [ 31.818576] ? xfrm_selector_match+0xe00/0xe00 [ 31.823150] ? rcu_read_lock_held+0xa9/0xc0 [ 31.827466] ? find_exception+0x3aa/0x520 [ 31.831600] ? lock_release+0xd70/0xd70 [ 31.835559] ? refcount_inc_not_zero+0xfe/0x180 [ 31.840231] ? xfrm_selector_match+0x3b/0xe00 [ 31.844721] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 31.849466] ? xfrm_selector_match+0xe00/0xe00 [ 31.854039] ? check_noncircular+0x20/0x20 [ 31.858260] ? ip_route_output_key_hash_rcu+0x604/0x2c20 [ 31.863705] xfrm_lookup+0xf0a/0x2540 [ 31.867496] ? xfrm_lookup+0xf0a/0x2540 [ 31.871500] ? ip_route_input_noref+0x1e0/0x1e0 [ 31.876163] ? xfrm_policy_lookup_bytype.constprop.49+0x16f0/0x16f0 [ 31.882551] ? find_held_lock+0x39/0x1d0 [ 31.886603] ? lock_downgrade+0x990/0x990 [ 31.890731] ? selinux_netlbl_sock_rcv_skb+0x9e/0x730 [ 31.895909] ? ip_route_output_key_hash+0x1a6/0x370 [ 31.900917] ? lock_release+0xd70/0xd70 [ 31.904889] ? selinux_nf_register+0x30/0x30 [ 31.909283] ? __lock_acquire+0x732/0x4620 [ 31.913525] ? selinux_sock_rcv_skb_compat+0x2f4/0x480 [ 31.919514] ? ip_route_output_key_hash+0x252/0x370 [ 31.924521] ? ip_route_output_key_hash_rcu+0x2c20/0x2c20 [ 31.930052] xfrm_lookup_route+0x39/0x1a0 [ 31.934186] ip_route_output_flow+0x7c/0xa0 [ 31.938491] inet_csk_route_req+0x5d8/0x990 [ 31.942802] tcp_v4_send_synack+0x1e4/0x270 [ 31.947114] ? tcp_v4_send_check+0x90/0x90 [ 31.951361] ? sk_filter_trim_cap+0x12f/0x9b0 [ 31.955845] ? prandom_u32_state+0x13/0x180 [ 31.960153] tcp_rtx_synack+0x119/0x2e0 [ 31.964109] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 31.969031] ? tcp_parse_fastopen_option+0xc1/0xf0 [ 31.973957] ? tcp_parse_options+0x188/0xa10 [ 31.978364] inet_rtx_syn_ack+0x64/0xd0 [ 31.982323] tcp_check_req+0xaf5/0x1630 [ 31.986288] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 31.991038] ? refcount_inc_not_zero+0xfe/0x180 [ 31.995706] ? refcount_add+0x60/0x60 [ 31.999497] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 32.004247] ? tcp_filter+0x111/0x160 [ 32.008044] tcp_v4_rcv+0x1f57/0x2f20 [ 32.011832] ? lock_acquire+0x1d5/0x580 [ 32.015806] ? tcp_v4_early_demux+0xa30/0xa30 [ 32.020295] ip_local_deliver_finish+0x2e2/0xba0 [ 32.025050] ? inet_del_offload+0x40/0x40 [ 32.029200] ? nf_hook_slow+0xd3/0x1a0 [ 32.033095] ip_local_deliver+0x1ce/0x6e0 [ 32.037249] ? ip_call_ra_chain+0x6d0/0x6d0 [ 32.041585] ? inet_del_offload+0x40/0x40 [ 32.045742] ip_rcv_finish+0x8db/0x19c0 [ 32.049713] ? ip_local_deliver_finish+0xba0/0xba0 [ 32.054627] ? iptable_nat_ipv4_fn+0x40/0x40 [ 32.059027] ? nf_nat_ipv4_in_range+0xf0/0xf0 [ 32.063523] ? ip_rcv+0xbe0/0x17d0 [ 32.067065] ? find_held_lock+0x39/0x1d0 [ 32.071126] ? tcp_v4_send_synack+0x270/0x270 [ 32.075628] ? nf_nat_ipv4_in+0x1cd/0x270 [ 32.079770] ? iptable_nat_ipv4_fn+0x40/0x40 [ 32.084171] ? nf_hook_slow+0xd3/0x1a0 [ 32.088051] ip_rcv+0xc3f/0x17d0 [ 32.091424] ? ip_local_deliver+0x6e0/0x6e0 [ 32.095852] ? __lock_acquire+0x732/0x4620 [ 32.100101] ? ip_local_deliver_finish+0xba0/0xba0 [ 32.105030] ? ip_local_deliver+0x6e0/0x6e0 [ 32.109358] __netif_receive_skb_core+0x19af/0x33d0 [ 32.114365] ? print_usage_bug+0x480/0x480 [ 32.118596] ? nf_ingress+0x9f0/0x9f0 [ 32.122406] ? save_stack+0x43/0xd0 [ 32.126024] ? kasan_slab_alloc+0x12/0x20 [ 32.130159] ? kmem_cache_alloc+0x12e/0x760 [ 32.134467] ? __build_skb+0x9d/0x450 [ 32.138258] ? build_skb+0x6f/0x260 [ 32.141865] ? tun_build_skb.isra.42+0x92f/0x1690 [ 32.146686] ? tun_get_user+0x1dad/0x2150 [ 32.150813] ? tun_chr_write_iter+0xde/0x190 [ 32.155204] ? vfs_write+0x18f/0x510 [ 32.158900] ? __skb_flow_get_ports+0x151/0x400 [ 32.163552] ? skb_flow_dissector_init+0x280/0x280 [ 32.168484] ? check_noncircular+0x20/0x20 [ 32.172717] ? __skb_flow_get_ports+0x151/0x400 [ 32.177381] ? __skb_flow_dissect+0x85b/0x3bc0 [ 32.181948] ? print_usage_bug+0x480/0x480 [ 32.186207] ? find_held_lock+0x39/0x1d0 [ 32.190284] ? lock_downgrade+0x990/0x990 [ 32.194421] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 32.199601] ? netif_receive_skb_internal+0x1d7/0x5e0 [ 32.204787] ? pvclock_read_flags+0x160/0x160 [ 32.209261] ? tun_build_skb.isra.42+0x455/0x1690 [ 32.214109] ? lock_acquire+0x1d5/0x580 [ 32.218077] ? netif_receive_skb_internal+0x93/0x5e0 [ 32.223171] ? ktime_get_with_offset+0x2c1/0x420 [ 32.227913] ? lock_release+0xd70/0xd70 [ 32.231886] ? ktime_get+0x3a0/0x3a0 [ 32.235583] ? skb_put+0x149/0x1c0 [ 32.239118] __netif_receive_skb+0x2c/0x1b0 [ 32.243421] ? __netif_receive_skb+0x2c/0x1b0 [ 32.247900] netif_receive_skb_internal+0x10b/0x5e0 [ 32.252898] ? dev_cpu_dead+0xb00/0xb00 [ 32.256851] ? save_stack_trace+0x16/0x20 [ 32.260986] ? __lock_acquire+0x20fd/0x4620 [ 32.265296] ? is_bpf_text_address+0xa4/0x120 [ 32.269772] ? rcu_pm_notify+0xc0/0xc0 [ 32.273639] ? unwind_get_return_address+0x61/0xa0 [ 32.278572] netif_receive_skb+0xae/0x390 [ 32.282711] ? netif_receive_skb_internal+0x5e0/0x5e0 [ 32.288036] ? lock_downgrade+0x990/0x990 [ 32.292169] ? tun_rx_batched.isra.43+0x5c3/0x860 [ 32.296991] tun_rx_batched.isra.43+0x5ed/0x860 [ 32.301648] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 32.306294] ? tun_sock_write_space+0x370/0x370 [ 32.310961] tun_get_user+0x11dd/0x2150 [ 32.314933] ? tun_build_skb.isra.42+0x1690/0x1690 [ 32.319846] ? lock_release+0xd70/0xd70 [ 32.323803] ? tun_chr_close+0x60/0x60 [ 32.327672] ? lock_release+0xd70/0xd70 [ 32.331634] ? __lock_is_held+0xbc/0x140 [ 32.335684] ? __tun_get+0x1d4/0x2e0 [ 32.339378] ? tun_chr_close+0x60/0x60 [ 32.343246] tun_chr_write_iter+0xde/0x190 [ 32.347459] __vfs_write+0x68a/0x970 [ 32.351150] ? default_llseek+0x2a0/0x2a0 [ 32.355284] ? avc_policy_seqno+0x9/0x20 [ 32.359319] ? selinux_file_permission+0x82/0x460 [ 32.364153] ? rw_verify_area+0xe5/0x2b0 [ 32.368188] ? __fdget_raw+0x20/0x20 [ 32.371880] vfs_write+0x18f/0x510 [ 32.375402] SyS_write+0xef/0x220 [ 32.378834] ? SyS_read+0x220/0x220 [ 32.382435] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.387430] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.392171] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.396901] RIP: 0033:0x405b81 [ 32.400066] RSP: 002b:00007fa6a2110d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 32.407754] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b81 [ 32.415000] RDX: 0000000000000046 RSI: 0000000020002000 RDI: 0000000000000003 [ 32.422246] RBP: 0000000000000082 R08: 0000000000000013 R09: 00007fa6a2111700 [ 32.429492] R10: 00007fa6a21119d0 R11: 0000000000000293 R12: 0000000000000000 [ 32.436737] R13: 00007ffe55aa741f R14: 00007fa6a21119c0 R15: 0000000000000000 [ 32.444002] [ 32.445602] The buggy address belongs to the page: [ 32.450507] page:ffffea0007396780 count:0 mapcount:0 mapping: (null) index:0xffff8801ce59e880 [ 32.459927] flags: 0x200000000000000() [ 32.463788] raw: 0200000000000000 0000000000000000 ffff8801ce59e880 00000000ffffffff [ 32.471641] raw: 0000000000000000 dead000000000200 0000000000000000 0000000000000000 [ 32.479492] page dumped because: kasan: bad access detected [ 32.485172] [ 32.486771] Memory state around the buggy address: [ 32.491673] ffff8801ce59e780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.499003] ffff8801ce59e800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 [ 32.506333] >ffff8801ce59e880: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 f1 [ 32.513666] ^ [ 32.517786] ffff8801ce59e900: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f2 f3 [ 32.525126] ffff8801ce59e980: f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 32.532478] ================================================================== [ 32.539823] Disabling lock debugging due to kernel taint [ 32.545289] Kernel panic - not syncing: panic_on_warn set ... [ 32.545289] [ 32.552626] CPU: 0 PID: 3015 Comm: syzkaller929616 Tainted: G B 4.13.0-mm1+ #5 [ 32.561082] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.570405] Call Trace: [ 32.572967] dump_stack+0x194/0x257 [ 32.576565] ? arch_local_irq_restore+0x53/0x53 [ 32.581203] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.585929] ? xfrm_state_find+0x2fb0/0x3190 [ 32.590304] panic+0x1e4/0x417 [ 32.593465] ? __warn+0x1d9/0x1d9 [ 32.596891] ? xfrm_state_find+0x305b/0x3190 [ 32.601267] kasan_end_report+0x50/0x50 [ 32.605205] kasan_report+0x137/0x340 [ 32.608975] __asan_report_load4_noabort+0x14/0x20 [ 32.613871] xfrm_state_find+0x305b/0x3190 [ 32.618082] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 32.623154] ? print_usage_bug+0x480/0x480 [ 32.627356] ? __lock_acquire+0x732/0x4620 [ 32.631568] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 32.636727] ? __lock_acquire+0x732/0x4620 [ 32.640942] ? __lock_acquire+0x732/0x4620