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-next-kasan-gce-5,10.128.0.49' (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: [ 61.797417] ================================================================== [ 61.798519] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 61.799423] Write of size 8 at addr ffff8801ce823740 by task syzkaller226236/2982 [ 61.800422] [ 61.800660] CPU: 1 PID: 2982 Comm: syzkaller226236 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 61.801783] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 61.803008] Call Trace: [ 61.803369] dump_stack+0x194/0x257 [ 61.803865] ? arch_local_irq_restore+0x53/0x53 [ 61.804490] ? show_regs_print_info+0x65/0x65 [ 61.805096] ? lock_timer_base+0x1a3/0x2b0 [ 61.805670] ? detach_if_pending+0x557/0x610 [ 61.806265] print_address_description+0x73/0x250 [ 61.806913] ? detach_if_pending+0x557/0x610 [ 61.807506] kasan_report+0x25b/0x340 [ 61.808043] __asan_report_store8_noabort+0x17/0x20 [ 61.808714] detach_if_pending+0x557/0x610 [ 61.809290] ? trace_raw_output_tick_stop+0x130/0x130 [ 61.810032] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 61.810659] ? lock_timer_base+0x1a3/0x2b0 [ 61.811235] ? lock_timer_base+0x1eb/0x2b0 [ 61.811833] ? __internal_add_timer+0x2d0/0x2d0 [ 61.812467] ? trace_hardirqs_on+0xd/0x10 [ 61.813036] try_to_del_timer_sync+0xa2/0x120 [ 61.813651] ? del_timer+0x130/0x130 [ 61.814160] ? del_timer_sync+0xeb/0x240 [ 61.814719] del_timer_sync+0x18a/0x240 [ 61.815288] tun_free_netdev+0x105/0x1b0 [ 61.815839] ? tun_xdp+0x410/0x410 [ 61.816364] ? cpumask_next+0x24/0x30 [ 61.816885] ? netdev_refcnt_read+0xed/0x150 [ 61.817491] netdev_run_todo+0x683/0xae0 [ 61.821099] ? tun_xdp+0x410/0x410 [ 61.824615] ? register_netdev+0x30/0x30 [ 61.828648] ? refcount_inc+0x50/0x50 [ 61.832432] ? refcount_inc+0x50/0x50 [ 61.836311] ? sk_destruct+0x4c/0x80 [ 61.839999] ? __sk_free+0x5c/0x230 [ 61.843600] ? sk_free+0x2f/0x40 [ 61.846943] ? __tun_detach+0x760/0x1570 [ 61.851395] ? locks_remove_file+0x3fa/0x5a0 [ 61.855778] ? fcntl_setlk+0x10d0/0x10d0 [ 61.859822] ? fsnotify+0x1af0/0x1af0 [ 61.863609] ? __tun_detach+0x1570/0x1570 [ 61.867731] rtnl_unlock+0xe/0x10 [ 61.871156] tun_chr_close+0x49/0x60 [ 61.874842] __fput+0x333/0x7f0 [ 61.878100] ? fput+0x140/0x140 [ 61.881354] ? check_same_owner+0x320/0x320 [ 61.885649] ? _raw_spin_unlock_irq+0x27/0x70 [ 61.890122] ____fput+0x15/0x20 [ 61.893376] task_work_run+0x199/0x270 [ 61.897240] ? task_work_cancel+0x210/0x210 [ 61.901535] ? _raw_spin_unlock+0x22/0x30 [ 61.905660] ? switch_task_namespaces+0x87/0xc0 [ 61.910309] do_exit+0x9c8/0x1b00 [ 61.913744] ? mm_update_next_owner+0x930/0x930 [ 61.918390] ? find_held_lock+0x39/0x1d0 [ 61.922437] ? lock_downgrade+0x990/0x990 [ 61.926584] ? handle_mm_fault+0x410/0x8d0 [ 61.930792] ? __do_page_fault+0x31e/0xd60 [ 61.935003] ? __handle_mm_fault+0x39c0/0x39c0 [ 61.939555] ? vmacache_find+0x5f/0x280 [ 61.943509] ? up_read+0x1a/0x40 [ 61.946849] ? __do_page_fault+0x3d6/0xd60 [ 61.951063] ? mm_fault_error+0x2c0/0x2c0 [ 61.955183] ? do_vfs_ioctl+0x492/0x1530 [ 61.959225] ? do_page_fault+0xee/0x720 [ 61.963172] ? __do_page_fault+0xd60/0xd60 [ 61.967381] ? iterate_fd+0x3f0/0x3f0 [ 61.971150] ? putname+0xf3/0x130 [ 61.974581] do_group_exit+0x149/0x400 [ 61.978440] ? lockdep_sys_exit+0x47/0xf0 [ 61.982561] ? SyS_exit+0x30/0x30 [ 61.985987] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 61.990979] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 61.995710] SyS_exit_group+0x1d/0x20 [ 61.999485] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 62.004213] RIP: 0033:0x443748 [ 62.007375] RSP: 002b:00007ffd05518c88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 62.015056] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443748 [ 62.022297] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 62.029538] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 62.036777] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 62.044015] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 62.051275] [ 62.052875] Allocated by task 2982: [ 62.056475] save_stack+0x43/0xd0 [ 62.059898] kasan_kmalloc+0xad/0xe0 [ 62.063580] __kmalloc_node+0x47/0x70 [ 62.067355] kvmalloc_node+0x64/0xd0 [ 62.071039] alloc_netdev_mqs+0x16d/0xed0 [ 62.075157] __tun_chr_ioctl+0x1386/0x3e40 [ 62.079360] tun_chr_ioctl+0x2a/0x40 [ 62.083044] do_vfs_ioctl+0x1b1/0x1530 [ 62.086899] SyS_ioctl+0x8f/0xc0 [ 62.090238] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 62.094961] [ 62.096560] Freed by task 2982: [ 62.099807] save_stack+0x43/0xd0 [ 62.103228] kasan_slab_free+0x71/0xc0 [ 62.107084] kfree+0xca/0x250 [ 62.110160] kvfree+0x36/0x60 [ 62.113238] free_netdev+0x2cf/0x360 [ 62.116925] __tun_chr_ioctl+0x2df6/0x3e40 [ 62.121131] tun_chr_ioctl+0x2a/0x40 [ 62.124817] do_vfs_ioctl+0x1b1/0x1530 [ 62.128673] SyS_ioctl+0x8f/0xc0 [ 62.132012] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 62.136736] [ 62.138336] The buggy address belongs to the object at ffff8801ce820340 [ 62.138336] which belongs to the cache kmalloc-16384 of size 16384 [ 62.151312] The buggy address is located 13312 bytes inside of [ 62.151312] 16384-byte region [ffff8801ce820340, ffff8801ce824340) [ 62.163506] The buggy address belongs to the page: [ 62.168407] page:ffffea00073a0800 count:1 mapcount:0 mapping:ffff8801ce820340 index:0x0 compound_mapcount: 0 [ 62.178356] flags: 0x200000000008100(slab|head) [ 62.182997] raw: 0200000000008100 ffff8801ce820340 0000000000000000 0000000100000001 [ 62.190847] raw: ffffea0007388420 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 62.198704] page dumped because: kasan: bad access detected [ 62.204393] [ 62.205991] Memory state around the buggy address: [ 62.210890] ffff8801ce823600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.218219] ffff8801ce823680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.225548] >ffff8801ce823700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.232875] ^ [ 62.238294] ffff8801ce823780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.245623] ffff8801ce823800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 62.252950] ================================================================== [ 62.260276] Disabling lock debugging due to kernel taint [ 62.265689] Kernel panic - not syncing: panic_on_warn set ... [ 62.265689] [ 62.273016] CPU: 1 PID: 2982 Comm: syzkaller226236 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 62.282859] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 62.292176] Call Trace: [ 62.294818] dump_stack+0x194/0x257 [ 62.298409] ? arch_local_irq_restore+0x53/0x53 [ 62.303046] ? vprintk_default+0x28/0x30 [ 62.307075] ? detach_if_pending+0x470/0x610 [ 62.311448] panic+0x1e4/0x41c [ 62.314605] ? refcount_error_report+0x214/0x214 [ 62.319328] ? detach_if_pending+0x557/0x610 [ 62.323703] kasan_end_report+0x50/0x50 [ 62.327643] kasan_report+0x144/0x340 [ 62.331412] __asan_report_store8_noabort+0x17/0x20 [ 62.336395] detach_if_pending+0x557/0x610 [ 62.340596] ? trace_raw_output_tick_stop+0x130/0x130 [ 62.345750] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 62.350381] ? lock_timer_base+0x1a3/0x2b0 [ 62.354578] ? lock_timer_base+0x1eb/0x2b0 [ 62.358780] ? __internal_add_timer+0x2d0/0x2d0 [ 62.363418] ? trace_hardirqs_on+0xd/0x10 [ 62.367537] try_to_del_timer_sync+0xa2/0x120 [ 62.371995] ? del_timer+0x130/0x130 [ 62.375673] ? del_timer_sync+0xeb/0x240 [ 62.379701] del_timer_sync+0x18a/0x240 [ 62.383644] tun_free_netdev+0x105/0x1b0 [ 62.387671] ? tun_xdp+0x410/0x410 [ 62.391175] ? cpumask_next+0x24/0x30 [ 62.394940] ? netdev_refcnt_read+0xed/0x150 [ 62.399317] netdev_run_todo+0x683/0xae0 [ 62.403343] ? tun_xdp+0x410/0x410 [ 62.406849] ? register_netdev+0x30/0x30 [ 62.410876] ? refcount_inc+0x50/0x50 [ 62.414640] ? refcount_inc+0x50/0x50 [ 62.418407] ? sk_destruct+0x4c/0x80 [ 62.422086] ? __sk_free+0x5c/0x230 [ 62.425677] ? sk_free+0x2f/0x40 [ 62.429009] ? __tun_detach+0x760/0x1570 [ 62.433047] ? locks_remove_file+0x3fa/0x5a0 [ 62.437421] ? fcntl_setlk+0x10d0/0x10d0 [ 62.441450] ? fsnotify+0x1af0/0x1af0 [ 62.445217] ? __tun_detach+0x1570/0x1570 [ 62.449327] rtnl_unlock+0xe/0x10 [ 62.452743] tun_chr_close+0x49/0x60 [ 62.456424] __fput+0x333/0x7f0 [ 62.459674] ? fput+0x140/0x140 [ 62.462918] ? check_same_owner+0x320/0x320 [ 62.467204] ? _raw_spin_unlock_irq+0x27/0x70 [ 62.471666] ____fput+0x15/0x20 [ 62.474910] task_work_run+0x199/0x270 [ 62.478761] ? task_work_cancel+0x210/0x210 [ 62.483045] ? _raw_spin_unlock+0x22/0x30 [ 62.487158] ? switch_task_namespaces+0x87/0xc0 [ 62.491797] do_exit+0x9c8/0x1b00 [ 62.495216] ? mm_update_next_owner+0x930/0x930 [ 62.499850] ? find_held_lock+0x39/0x1d0 [ 62.503882] ? lock_downgrade+0x990/0x990 [ 62.508006] ? handle_mm_fault+0x410/0x8d0 [ 62.512206] ? __do_page_fault+0x31e/0xd60 [ 62.516408] ? __handle_mm_fault+0x39c0/0x39c0 [ 62.520953] ? vmacache_find+0x5f/0x280 [ 62.524896] ? up_read+0x1a/0x40 [ 62.528226] ? __do_page_fault+0x3d6/0xd60 [ 62.532441] ? mm_fault_error+0x2c0/0x2c0 [ 62.536554] ? do_vfs_ioctl+0x492/0x1530 [ 62.540584] ? do_page_fault+0xee/0x720 [ 62.544531] ? __do_page_fault+0xd60/0xd60 [ 62.548730] ? iterate_fd+0x3f0/0x3f0 [ 62.552492] ? putname+0xf3/0x130 [ 62.555913] do_group_exit+0x149/0x400 [ 62.559766] ? lockdep_sys_exit+0x47/0xf0 [ 62.563877] ? SyS_exit+0x30/0x30 [ 62.567294] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 62.572274] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 62.576995] SyS_exit_group+0x1d/0x20 [ 62.580759] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 62.585479] RIP: 0033:0x443748 [ 62.588632] RSP: 002b:00007ffd05518c88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 62.596304] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443748 [ 62.603541] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 62.610783] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 62.618024] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 62.625260] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 62.632568] Dumping ftrace buffer: [ 62.636075] (ftrace buffer empty) [ 62.639750] Kernel Offset: disabled [ 62.643345] Rebooting in 86400 seconds..