serialport: Connected to syzkaller.us-central1-c.ci-android-49-kasan-gce-5 port 1 (session ID: 6026c8a3c6073540c7ac6f09dfb23330f9cca0121168a461ae9aa058966c6299, active connections: 1). 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-android-49-kasan-gce-5,10.128.0.7' (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: [ 37.054695] ================================================================== [ 37.055764] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x2453/0x2830 at addr ffff8801db307580 [ 37.057025] Read of size 4 by task syzkaller850164/3270 [ 37.057755] page:ffffea00076cc1c0 count:1 mapcount:0 mapping: (null) index:0x0 [ 37.058867] flags: 0x8000000000000400(reserved) [ 37.059483] page dumped because: kasan: bad access detected [ 37.060247] CPU: 1 PID: 3270 Comm: syzkaller850164 Not tainted 4.9.41-gdb02484 #19 [ 37.061253] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.062470] ffff8801db306c68 ffffffff81d8f749 ffffed003b660eb0 0000000000000004 [ 37.063597] 0000000000000000 ffffed003b660eb0 ffff8801db307580 ffff8801db306cf0 [ 37.064776] ffffffff81539883 0000000000000000 0000000000000002 ffffffff833cab23 [ 37.065914] Call Trace: [ 37.066264] [ 37.066552] [] dump_stack+0xc1/0x128 [ 37.067288] [] kasan_report.part.1+0x4c3/0x500 [ 37.068120] [] ? xfrm_state_find+0x2453/0x2830 [ 37.068963] [] ? xfrm_state_find+0x25a/0x2830 [ 37.069773] [] __asan_report_load4_noabort+0x29/0x30 [ 37.070729] [] xfrm_state_find+0x2453/0x2830 [ 37.071526] [] ? xfrm_state_find+0x25a/0x2830 [ 37.072348] [] ? tun_net_xmit+0x28f/0x1150 [ 37.073151] [] ? tun_net_xmit+0x4e/0x1150 [ 37.073960] [] ? xfrm_unregister_mode+0x200/0x200 [ 37.074821] [] ? dev_deactivate_queue.constprop.28+0x150/0x150 [ 37.082412] [] ? dev_queue_xmit+0x17/0x20 [ 37.088171] [] ? __dev_queue_xmit+0x8c3/0x1e60 [ 37.094369] [] ? trace_hardirqs_on+0xd/0x10 [ 37.100348] [] ? __local_bh_enable_ip+0x6a/0xd0 [ 37.106630] [] ? __dev_queue_xmit+0x901/0x1e60 [ 37.112823] [] ? dev_queue_xmit+0x17/0x20 [ 37.118585] [] xfrm_tmpl_resolve+0x298/0xa90 [ 37.124608] [] ? xfrm_policy_get_afinfo+0x1e0/0x1e0 [ 37.131237] [] ? memcpy+0x45/0x50 [ 37.136307] [] ? dev_queue_xmit+0x17/0x20 [ 37.142071] [] ? netlbl_enabled+0x9/0x50 [ 37.147745] [] ? mod_timer+0x5ba/0xea0 [ 37.153245] [] ? ip_finish_output2+0x6b6/0x1060 [ 37.159528] [] ? get_stack_info+0x37/0x130 [ 37.165378] [] ? update_stack_state.constprop.5+0xca/0x150 [ 37.172621] [] ? __module_text_address+0x13/0x150 [ 37.179075] [] ? __unwind_start+0x1e3/0x3c0 [ 37.185008] [] xfrm_resolve_and_create_bundle+0xd7/0x1d50 [ 37.192160] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.199136] [] ? unwind_get_return_address+0x7a/0xa0 [ 37.205852] [] ? __save_stack_trace+0x8d/0xf0 [ 37.211965] [] ? depot_save_stack+0x122/0x4a0 [ 37.218072] [] ? kfree_skbmem+0xd7/0xf0 [ 37.223662] [] ? __xfrm_decode_session+0x100/0x100 [ 37.230204] [] ? xfrm_selector_match+0xe40/0xe40 [ 37.236571] [] ? xfrm_sk_policy_lookup+0x200/0x370 [ 37.243111] [] ? xfrm_sk_policy_lookup+0x227/0x370 [ 37.249653] [] ? xfrm_selector_match+0xe40/0xe40 [ 37.256019] [] ? xfrm_expand_policies+0x25b/0x5b0 [ 37.262474] [] xfrm_lookup+0x984/0xbf0 [ 37.267974] [] ? xfrm_bundle_lookup+0x11b0/0x11b0 [ 37.274431] [] ? __ip_route_output_key_hash+0x7e5/0x23e0 [ 37.281493] [] ? __ip_route_output_key_hash+0x80c/0x23e0 [ 37.288555] [] ? __ip_route_output_key_hash+0xc94/0x23e0 [ 37.295617] [] ? ip_rt_update_pmtu+0x8b0/0x8b0 [ 37.301813] [] xfrm_lookup_route+0x39/0x1a0 [ 37.307754] [] ip_route_output_flow+0x7f/0xa0 [ 37.313863] [] inet_csk_route_req+0x5d8/0x9a0 [ 37.319969] [] tcp_v4_send_synack+0x203/0x290 [ 37.326077] [] ? __local_bh_enable_ip+0x6a/0xd0 [ 37.332355] [] ? tcp_v4_send_check+0x90/0x90 [ 37.338378] [] ? prandom_u32_state+0x13/0x180 [ 37.344573] [] tcp_rtx_synack+0x121/0x1a0 [ 37.350335] [] ? tcp_rtx_synack.part.33+0x1d0/0x1d0 [ 37.356966] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.363943] [] ? ip_vs_in.part.29.constprop.37+0x12e/0x1b40 [ 37.371265] [] ? ipt_do_table+0xc0d/0x16d0 [ 37.377111] [] ? trace_hardirqs_on+0xd/0x10 [ 37.383046] [] ? __local_bh_enable_ip+0x6a/0xd0 [ 37.389326] [] inet_rtx_syn_ack+0x64/0xd0 [ 37.395084] [] tcp_check_req+0x926/0x11e0 [ 37.400843] [] ? tcp_timewait_state_process+0xeb0/0xeb0 [ 37.407815] [] ? tcp_v4_inbound_md5_hash+0x155/0x510 [ 37.414536] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.421517] [] ? check_preemption_disabled+0x3b/0x200 [ 37.428322] [] tcp_v4_rcv+0x14de/0x29c0 [ 37.433906] [] ? raw_local_deliver+0x1b3/0xaf0 [ 37.440101] [] ? ipv4_confirm+0x2e4/0x3f0 [ 37.445862] [] ip_local_deliver_finish+0x285/0xa80 [ 37.452404] [] ? ip_local_deliver_finish+0x129/0xa80 [ 37.459119] [] ip_local_deliver+0x30a/0x4d0 [ 37.465052] [] ? ip_local_deliver+0x1ab/0x4d0 [ 37.471157] [] ? ip_call_ra_chain+0x540/0x540 [ 37.477265] [] ? ip_rcv_finish+0x1900/0x1900 [ 37.483285] [] ? tcp_v4_early_demux+0x4f/0x7a0 [ 37.489478] [] ip_rcv_finish+0x71b/0x1900 [ 37.495239] [] ? ip_rcv+0xa4a/0x1620 [ 37.500653] [] ip_rcv+0xbc2/0x1620 [ 37.505806] [] ? ip_rcv+0xa4a/0x1620 [ 37.511136] [] ? debug_smp_processor_id+0x1c/0x20 [ 37.517591] [] ? ip_local_deliver+0x4d0/0x4d0 [ 37.523698] [] ? inet_del_offload+0x40/0x40 [ 37.529637] [] ? update_load_avg+0x7bf/0x1db0 [ 37.535746] [] ? check_preemption_disabled+0x3b/0x200 [ 37.542546] [] ? ip_local_deliver+0x4d0/0x4d0 [ 37.548654] [] __netif_receive_skb_core+0xa33/0x29e0 [ 37.555374] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.562349] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.569326] [] ? netif_wake_subqueue+0x210/0x210 [ 37.575692] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.582668] [] ? ttwu_do_wakeup+0x27b/0x540 [ 37.588601] [] ? try_to_wake_up+0xb7/0xee0 [ 37.594453] [] ? process_backlog+0x17c/0x690 [ 37.600475] [] __netif_receive_skb+0x5b/0x1c0 [ 37.606583] [] process_backlog+0x1d4/0x690 [ 37.612428] [] ? process_backlog+0x17c/0x690 [ 37.618450] [] net_rx_action+0x396/0xe00 [ 37.624128] [] ? clockevents_program_event+0x1a5/0x350 [ 37.631019] [] ? sk_busy_loop+0xca0/0xca0 [ 37.636778] [] ? clockevents_program_event+0x131/0x350 [ 37.643667] [] ? tick_program_event+0xaf/0x110 [ 37.649862] [] ? check_preemption_disabled+0x3b/0x200 [ 37.656666] [] __do_softirq+0x22d/0x964 [ 37.662261] [] ? rcu_eqs_enter_common.constprop.77+0xe5/0x1c0 [ 37.669756] [] do_softirq_own_stack+0x1c/0x30 [ 37.675860] [ 37.677888] [] do_softirq.part.16+0x99/0xb0 [ 37.683834] [] do_softirq+0x18/0x20 [ 37.689073] [] netif_rx_ni+0x140/0x320 [ 37.694572] [] tun_get_user+0xac5/0x2080 [ 37.700243] [] ? tun_chr_ioctl+0x40/0x40 [ 37.705918] [] ? preempt_count_add+0x7d/0x170 [ 37.712028] [] ? get_page_from_freelist+0x9d1/0x1a00 [ 37.718743] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 37.725805] [] ? tun_net_uninit+0x20/0x20 [ 37.731568] [] ? __tun_get+0x12a/0x230 [ 37.737068] [] tun_chr_write_iter+0xd5/0x190 [ 37.743092] [] __vfs_write+0x4bf/0x680 [ 37.748596] [] ? default_llseek+0x290/0x290 [ 37.754530] [] ? avc_policy_seqno+0x9/0x20 [ 37.760376] [] ? selinux_file_permission+0x82/0x460 [ 37.767002] [] ? rw_verify_area+0xe5/0x2b0 [ 37.772848] [] vfs_write+0x170/0x4e0 [ 37.778175] [] SyS_write+0xd9/0x1b0 [ 37.783413] [] ? SyS_read+0x1b0/0x1b0 [ 37.788827] [] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 37.795369] [] entry_SYSCALL_64_fastpath+0x23/0xc6 [ 37.801907] Memory state around the buggy address: [ 37.806800] ffff8801db307480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 37.814122] ffff8801db307500: 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 [ 37.821441] >ffff8801db307580: f2 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 [ 37.828761] ^ [ 37.832089] ffff8801db307600: 00 00 00 00 00 00 00 00 00 00 f2 f2 00 00 00 00 [ 37.839409] ffff8801db307680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 37.846727] ================================================================== [ 37.854106] ================================================================== [ 37.861434] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0xc9b/0x2830 at addr ffff8801db307580 [ 37.870665] Read of size 4 by task syzkaller850164/3270 [ 37.875992] page:ffffea00076cc1c0 count:1 mapcount:0 mapping: (null) index:0x0 [ 37.884206] flags: 0x8000000000000400(reserved) [ 37.888833] page dumped because: kasan: bad access detected [ 37.894507] CPU: 1 PID: 3270 Comm: syzkaller850164 Tainted: G B 4.9.41-gdb02484 #19 [ 37.903390] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 37.912706] ffff8801db306c68 ffffffff81d8f749 ffffed003b660eb0 0000000000000004 [ 37.920646] 0000000000000000 ffffed003b660eb0 ffff8801db307580 ffff8801db306cf0 [ 37.928577] ffffffff81539883 0000000000000010 0000000000000000 ffffffff833c936b [ 37.936521] Call Trace: [ 37.939066] [ 37.941094] [] dump_stack+0xc1/0x128 [ 37.946434] [] kasan_report.part.1+0x4c3/0x500 [ 37.952716] [] ? xfrm_state_find+0xc9b/0x2830 [ 37.958908] [] __asan_report_load4_noabort+0x29/0x30 [ 37.965622] [] xfrm_state_find+0xc9b/0x2830 [ 37.971556] [] ? xfrm_state_find+0x25a/0x2830 [ 37.977664] [] ? tun_net_xmit+0x28f/0x1150 [ 37.983511] [] ? tun_net_xmit+0x4e/0x1150 [ 37.989272] [] ? xfrm_unregister_mode+0x200/0x200 [ 37.995727] [] ? dev_deactivate_queue.constprop.28+0x150/0x150 [ 38.003312] [] ? dev_queue_xmit+0x17/0x20 [ 38.009071] [] ? __dev_queue_xmit+0x8c3/0x1e60 [ 38.015264] [] ? trace_hardirqs_on+0xd/0x10 [ 38.021199] [] ? __local_bh_enable_ip+0x6a/0xd0 [ 38.027481] [] ? __dev_queue_xmit+0x901/0x1e60 [ 38.033674] [] ? dev_queue_xmit+0x17/0x20 [ 38.039433] [] xfrm_tmpl_resolve+0x298/0xa90 [ 38.045453] [] ? xfrm_policy_get_afinfo+0x1e0/0x1e0 [ 38.052080] [] ? memcpy+0x45/0x50