serialport: Connected to syzkaller.us-central1-c.ci-upstream-kasan-gce-6 port 1 (session ID: d6af483e3610894b989e4183f3399a59ccd4549f12a4adc2e53b1f5a4914ee95, 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-upstream-kasan-gce-6,10.128.0.32' (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: [ 22.646176] ================================================================== [ 22.647438] BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x303d/0x3170 [ 22.648553] Read of size 4 at addr ffff8801d193e5e8 by task syzkaller699503/2947 [ 22.649569] [ 22.649858] CPU: 1 PID: 2947 Comm: syzkaller699503 Not tainted 4.13.0-rc4+ #24 [ 22.650874] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.652217] Call Trace: [ 22.652613] dump_stack+0x194/0x257 [ 22.653135] ? arch_local_irq_restore+0x53/0x53 [ 22.653781] ? show_regs_print_info+0x65/0x65 [ 22.654422] ? lock_release+0xa40/0xa40 [ 22.654955] ? xfrm_state_find+0x303d/0x3170 [ 22.655547] print_address_description+0x7f/0x260 [ 22.656240] ? xfrm_state_find+0x303d/0x3170 [ 22.656887] kasan_report+0x24e/0x340 [ 22.657497] __asan_report_load4_noabort+0x14/0x20 [ 22.658175] xfrm_state_find+0x303d/0x3170 [ 22.658795] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 22.659498] ? __lock_acquire+0x6ef/0x3dc0 [ 22.660064] ? print_usage_bug+0x480/0x480 [ 22.660647] ? check_noncircular+0x20/0x20 [ 22.661253] ? check_noncircular+0x20/0x20 [ 22.661828] ? __lock_acquire+0x6ef/0x3dc0 [ 22.662413] ? print_usage_bug+0x480/0x480 [ 22.662990] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 22.663750] ? rcu_read_lock_sched_held+0x108/0x120 [ 22.664453] ? fib_table_lookup+0xa07/0x1a30 [ 22.665080] xfrm_tmpl_resolve+0x309/0xbf0 [ 22.665756] ? __xfrm_dst_lookup+0x120/0x120 [ 22.667059] ? __lock_is_held+0xb6/0x140 [ 22.671096] ? check_noncircular+0x20/0x20 [ 22.675306] ? check_noncircular+0x20/0x20 [ 22.679518] ? rcu_read_lock_held+0xa9/0xc0 [ 22.683807] ? find_exception+0x3aa/0x520 [ 22.687933] xfrm_resolve_and_create_bundle+0x102/0x2080 [ 22.693356] ? lock_downgrade+0x990/0x990 [ 22.697496] ? __xfrm_decode_session+0x100/0x100 [ 22.702225] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 22.706957] ? lock_downgrade+0x990/0x990 [ 22.711085] ? lock_release+0xa40/0xa40 [ 22.715049] ? refcount_inc_not_zero+0xfe/0x180 [ 22.719699] ? xfrm_selector_match+0x3b/0xe00 [ 22.724168] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 22.728903] ? xfrm_selector_match+0xe00/0xe00 [ 22.733467] xfrm_lookup+0xd39/0x11c0 [ 22.737239] ? xfrm_lookup+0xd39/0x11c0 [ 22.741201] ? xfrm_sk_policy_lookup+0x3d0/0x3d0 [ 22.745929] ? lock_release+0xa40/0xa40 [ 22.749893] ? ip_route_output_key_hash+0x252/0x370 [ 22.754992] ? ip_route_output_key_hash_rcu+0x2bb0/0x2bb0 [ 22.760515] xfrm_lookup_route+0x39/0x1a0 [ 22.764638] ip_route_output_flow+0x7c/0xa0 [ 22.768931] inet_csk_route_req+0x5d8/0x990 [ 22.773230] tcp_v4_send_synack+0x1e4/0x270 [ 22.777533] ? tcp_v4_send_check+0x90/0x90 [ 22.781748] ? prandom_u32_state+0x13/0x180 [ 22.786049] tcp_rtx_synack+0x119/0x2e0 [ 22.790001] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 22.794915] ? tcp_md5_do_del+0x2a0/0x2a0 [ 22.799070] inet_rtx_syn_ack+0x64/0xd0 [ 22.803031] tcp_check_req+0xae3/0x1620 [ 22.806978] ? tcp_error+0x740/0x740 [ 22.810660] ? tcp_parse_md5sig_option+0xbe/0x160 [ 22.815475] ? tcp_openreq_init_rwin+0xae0/0xae0 [ 22.820200] ? refcount_inc_not_zero+0xfe/0x180 [ 22.824839] ? refcount_add+0x60/0x60 [ 22.828627] ? tcp_v4_reqsk_send_ack+0x3e0/0x3e0 [ 22.833360] ? check_noncircular+0x20/0x20 [ 22.837575] tcp_v4_rcv+0x168e/0x2df0 [ 22.841352] ? lock_acquire+0x1d5/0x580 [ 22.845297] ? lock_acquire+0x1d5/0x580 [ 22.849260] ? tcp_v4_early_demux+0xa30/0xa30 [ 22.853736] ip_local_deliver_finish+0x2e2/0xba0 [ 22.858475] ? inet_del_offload+0x40/0x40 [ 22.862620] ip_local_deliver+0x1ce/0x6d0 [ 22.866748] ? ip_call_ra_chain+0x6d0/0x6d0 [ 22.871064] ? inet_del_offload+0x40/0x40 [ 22.875200] ip_rcv_finish+0x8db/0x19c0 [ 22.879161] ? iptable_nat_ipv4_fn+0x40/0x40 [ 22.883551] ? ip_local_deliver_finish+0xba0/0xba0 [ 22.888457] ? ip_rcv+0xf05/0x17d0 [ 22.891967] ? lock_downgrade+0x990/0x990 [ 22.896085] ? tcp_v4_send_synack+0x270/0x270 [ 22.900554] ? rcu_read_lock_held+0xa9/0xc0 [ 22.904849] ? nf_hook_slow+0x12d/0x290 [ 22.908820] ip_rcv+0xc3f/0x17d0 [ 22.912183] ? ip_local_deliver+0x6d0/0x6d0 [ 22.916498] ? ip_local_deliver_finish+0xba0/0xba0 [ 22.921411] ? ip_local_deliver+0x6d0/0x6d0 [ 22.925725] __netif_receive_skb_core+0x1b05/0x3230 [ 22.930733] ? nf_ingress+0x980/0x980 [ 22.934502] ? print_usage_bug+0x480/0x480 [ 22.938706] ? lock_downgrade+0x990/0x990 [ 22.942831] ? __free_insn_slot+0x5c0/0x5c0 [ 22.947131] ? unwind_get_return_address+0x61/0xa0 [ 22.952040] ? is_bpf_text_address+0xa4/0x120 [ 22.956509] ? check_noncircular+0x20/0x20 [ 22.960715] ? unwind_get_return_address+0x61/0xa0 [ 22.965617] ? __save_stack_trace+0x7e/0xd0 [ 22.969911] ? depot_save_stack+0x12c/0x490 [ 22.974215] ? find_held_lock+0x35/0x1d0 [ 22.978299] ? lock_downgrade+0x990/0x990 [ 22.982416] ? __skb_flow_get_ports+0x151/0x400 [ 22.987063] ? pvclock_read_flags+0x160/0x160 [ 22.991534] ? lock_acquire+0x1d5/0x580 [ 22.995473] ? lock_acquire+0x1d5/0x580 [ 22.999428] ? netif_receive_skb_internal+0xf1/0x1a50 [ 23.004590] ? ktime_get_with_offset+0x2c1/0x420 [ 23.009318] ? lock_release+0xa40/0xa40 [ 23.013258] ? do_gettimeofday+0x190/0x190 [ 23.017470] ? netif_receive_skb_internal+0xf1/0x1a50 [ 23.022639] __netif_receive_skb+0x2c/0x1b0 [ 23.026925] ? __netif_receive_skb+0x2c/0x1b0 [ 23.031388] ? netif_receive_skb_internal+0xf1/0x1a50 [ 23.036545] netif_receive_skb_internal+0x16a/0x1a50 [ 23.041618] ? __alloc_skb+0x548/0x740 [ 23.045478] ? dev_queue_xmit_accel+0x30/0x30 [ 23.049966] ? find_held_lock+0x35/0x1d0 [ 23.054003] ? __might_fault+0x110/0x1d0 [ 23.058046] ? lock_downgrade+0x990/0x990 [ 23.062164] ? lock_release+0xa40/0xa40 [ 23.066106] ? check_same_owner+0x320/0x320 [ 23.070484] ? rcu_pm_notify+0xc0/0xc0 [ 23.074355] netif_receive_skb+0xae/0x390 [ 23.078561] ? netif_receive_skb_internal+0x1a50/0x1a50 [ 23.083893] ? _copy_from_iter+0x367/0xf30 [ 23.088100] ? __check_object_size+0x268/0x500 [ 23.092686] ? tun_rx_batched.isra.42+0x5bd/0x860 [ 23.097501] tun_rx_batched.isra.42+0x5e7/0x860 [ 23.102144] ? skb_get_hash_perturb+0x9d0/0x9d0 [ 23.106784] ? tun_sock_write_space+0x370/0x370 [ 23.111424] ? tun_free_netdev+0x1b0/0x1b0 [ 23.115642] tun_get_user+0xde5/0x2910 [ 23.119518] ? tun_chr_ioctl+0x40/0x40 [ 23.123390] ? find_held_lock+0x35/0x1d0 [ 23.127429] ? __fget+0x333/0x570 [ 23.130866] ? find_held_lock+0x35/0x1d0 [ 23.134903] ? __tun_get+0x1ab/0x2e0 [ 23.138588] ? lock_downgrade+0x990/0x990 [ 23.142706] ? lock_release+0xa40/0xa40 [ 23.146665] ? __lock_is_held+0xb6/0x140 [ 23.150712] ? __tun_get+0x1d4/0x2e0 [ 23.154400] ? tun_chr_close+0x60/0x60 [ 23.158273] tun_chr_write_iter+0xd8/0x190 [ 23.162493] __vfs_write+0x684/0x970 [ 23.166180] ? default_llseek+0x290/0x290 [ 23.170298] ? finish_task_switch+0x1d3/0x740 [ 23.174768] ? avc_policy_seqno+0x9/0x20 [ 23.178809] ? selinux_file_permission+0x82/0x460 [ 23.183653] ? rw_verify_area+0xe5/0x2b0 [ 23.187691] ? __fdget_raw+0x20/0x20 [ 23.191380] vfs_write+0x189/0x510 [ 23.194903] SyS_write+0xef/0x220 [ 23.198329] ? SyS_read+0x220/0x220 [ 23.201923] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.206910] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.211643] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 23.216370] RIP: 0033:0x405b91 [ 23.219533] RSP: 002b:00007f49ae2e2d90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 23.227209] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000405b91 [ 23.234473] RDX: 0000000000000036 RSI: 0000000020002000 RDI: 0000000000000003 [ 23.241713] RBP: 0000000000000086 R08: 0000000000000013 R09: 00007f49ae2e3700 [ 23.248952] R10: 00007f49ae2e39d0 R11: 0000000000000293 R12: 0000000000000000 [ 23.256201] R13: 00007ffc55d72f6f R14: 00007f49ae2e39c0 R15: 0000000000000000 [ 23.263461] [ 23.265057] The buggy address belongs to the page: [ 23.269962] page:ffffea00065d8590 count:0 mapcount:0 mapping: (null) index:0xffff8801d193ea40 [ 23.279380] flags: 0x200000000000000() [ 23.283240] raw: 0200000000000000 0000000000000000 ffff8801d193ea40 00000000ffffffff [ 23.291098] raw: dead000000000100 dead000000000200 0000000000000000 [ 23.297470] page dumped because: kasan: bad access detected [ 23.303147] [ 23.304739] Memory state around the buggy address: [ 23.309643] ffff8801d193e480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 23.316970] ffff8801d193e500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 23.324303] >ffff8801d193e580: 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 f2 f3 f3 [ 23.331627] ^ [ 23.338352] ffff8801d193e600: f3 f3 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 [ 23.345692] ffff8801d193e680: 00 00 00 00 00 00 00 f2 f2 f3 f3 f3 f3 00 00 00 [ 23.353024] ================================================================== [ 23.360351] Disabling lock debugging due to kernel taint [ 23.365814] Kernel panic - not syncing: panic_on_warn set ... [ 23.365814] [ 23.373157] CPU: 1 PID: 2947 Comm: syzkaller699503 Tainted: G B 4.13.0-rc4+ #24 [ 23.381703] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.391039] Call Trace: [ 23.394127] dump_stack+0x194/0x257 [ 23.397741] ? arch_local_irq_restore+0x53/0x53 [ 23.402469] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.407210] ? xfrm_state_find+0x2fc0/0x3170 [ 23.411602] panic+0x1e4/0x417 [ 23.414766] ? __warn+0x1d9/0x1d9 [ 23.418214] ? xfrm_state_find+0x303d/0x3170 [ 23.422592] kasan_end_report+0x50/0x50 [ 23.426534] kasan_report+0x137/0x340 [ 23.430309] __asan_report_load4_noabort+0x14/0x20 [ 23.435991] xfrm_state_find+0x303d/0x3170 [ 23.440207] ? xfrm_state_afinfo_get_rcu+0x160/0x160 [ 23.445285] ? __lock_acquire+0x6ef/0x3dc0 [ 23.449496] ? print_usage_bug+0x480/0x480 [ 23.453703] ? check_noncircular+0x20/0x20 [ 23.457904] ? check_noncircular+0x20/0x20 [ 23.462115] ? __lock_acquire+0x6ef/0x3dc0 [ 23.466317] ? print_usage_bug+0x480/0x480 [ 23.470525] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 23.476556] ? rcu_read_lock_sched_held+0x108/0x120 [ 23.481542] ? fib_table_lookup+0xa07/0x1a30 [ 23.485932] xfrm_tmpl_resolve+0x309/0xbf0 [ 23.490142] ? __xfrm_dst_lookup+0x120/0x120 [ 23.494516] ? __lock_is_held+0xb6/0x140 [ 23.498552] ? check_noncircular+0x20/0x20 [ 23.502751] ? check_noncircular+0x20/0x20 [ 23.506949] ? rcu_read_lock_held+0xa9/0xc0 [ 23.511236] ? find_exception+0x3aa/0x520 [ 23.515353] xfrm_resolve_and_create_bundle+0x102/0x2080 [ 23.520776] ? lock_downgrade+0x990/0x990 [ 23.524906] ? __xfrm_decode_session+0x100/0x100 [ 23.529626] ? xfrm_sk_policy_lookup+0x2a6/0x3d0 [ 23.534344] ? lock_downgrade+0x990/0x990 [ 23.538465] ? lock_release+0xa40/0xa40 [ 23.542407] ? refcount_inc_not_zero+0xfe/0x180 [ 23.547053] ? xfrm_selector_match+0x3b/0xe00 [ 23.551518] ? xfrm_sk_policy_lookup+0x2cf/0x3d0 [ 23.556244] ? xfrm_selector_match+0xe00/0xe00 [ 23.560799] xfrm_lookup+0xd39/0x11c0 [ 23.564567] ? xfrm_lookup+0xd39/0x11c0 [ 23.568516] ? xfrm_sk_policy_lookup+0x3d0/0x3d0 [ 23.573245] ? lock_release+0xa40/0xa40 [ 23.577201] ? ip_route_output_key_hash+0x252/0x370 [ 23.582186] ? ip_route_output_key_hash_rcu+0x2bb0/0x2bb0 [ 23.587695] xfrm_lookup_route+0x39/0x1a0 [ 23.591813] ip_route_output_flow+0x7c/0xa0 [ 23.596110] inet_csk_route_req+0x5d8/0x990 [ 23.600406] tcp_v4_send_synack+0x1e4/0x270 [ 23.604698] ? tcp_v4_send_check+0x90/0x90 [ 23.608902] ? prandom_u32_state+0x13/0x180 [ 23.613201] tcp_rtx_synack+0x119/0x2e0 [ 23.617143] ? tcp_event_new_data_sent+0x2e0/0x2e0 [ 23.622046] ? tcp_md5_do_del+0x2a0/0x2a0 [ 23.626169] inet_rtx_syn_ack+0x64/0xd0 [ 23.630116] tcp_check_req+0xae3/0x1620 [ 23.634061] ? tcp_error+0x740/0x740 [ 23.637740] ? tcp_parse_md5sig_option+0xbe/0x160 [ 23.642550] ? tcp_openreq_init_rwin+0xae0/0xae0