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-8,10.128.0.47' (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: [ 32.165338] ================================================================== [ 32.172810] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 32.179540] Write of size 8 at addr ffff8801ce19b7c0 by task syzkaller216077/2984 [ 32.187128] [ 32.188730] CPU: 0 PID: 2984 Comm: syzkaller216077 Not tainted 4.13.0-next-20170911+ #19 [ 32.196926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.206249] Call Trace: [ 32.208814] dump_stack+0x194/0x257 [ 32.212416] ? arch_local_irq_restore+0x53/0x53 [ 32.217056] ? show_regs_print_info+0x65/0x65 [ 32.221523] ? lock_timer_base+0x1a3/0x2b0 [ 32.225731] ? detach_if_pending+0x557/0x610 [ 32.230119] print_address_description+0x73/0x250 [ 32.234932] ? detach_if_pending+0x557/0x610 [ 32.239311] kasan_report+0x24e/0x340 [ 32.243086] __asan_report_store8_noabort+0x17/0x20 [ 32.248070] detach_if_pending+0x557/0x610 [ 32.252277] ? trace_raw_output_tick_stop+0x130/0x130 [ 32.257440] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 32.262078] ? lock_timer_base+0x1a3/0x2b0 [ 32.266282] ? lock_timer_base+0x1eb/0x2b0 [ 32.270496] ? __internal_add_timer+0x2d0/0x2d0 [ 32.275136] ? trace_hardirqs_on+0xd/0x10 [ 32.279263] try_to_del_timer_sync+0xa2/0x120 [ 32.283737] ? del_timer+0x130/0x130 [ 32.287424] ? del_timer_sync+0xeb/0x240 [ 32.291462] del_timer_sync+0x18a/0x240 [ 32.295410] tun_free_netdev+0x105/0x1b0 [ 32.299442] ? tun_xdp+0x410/0x410 [ 32.302952] ? cpumask_next+0x24/0x30 [ 32.306726] ? netdev_refcnt_read+0xed/0x150 [ 32.311108] ? tun_xdp+0x410/0x410 [ 32.314622] netdev_run_todo+0x870/0xca0 [ 32.318654] ? do_group_exit+0x149/0x400 [ 32.322689] ? register_netdev+0x30/0x30 [ 32.326725] ? lock_downgrade+0x990/0x990 [ 32.330844] ? trace_hardirqs_on+0xd/0x10 [ 32.334980] ? refcount_sub_and_test+0x115/0x1b0 [ 32.339706] ? refcount_inc+0x50/0x50 [ 32.343477] ? refcount_inc+0x50/0x50 [ 32.347253] ? sk_destruct+0x4c/0x80 [ 32.350935] ? __sk_free+0x5c/0x230 [ 32.354538] ? sk_free+0x2f/0x40 [ 32.357873] ? __tun_detach+0x176/0x1390 [ 32.361915] ? tun_attach+0xf90/0xf90 [ 32.365696] ? locks_remove_file+0x3fa/0x5a0 [ 32.370077] ? fcntl_setlk+0x10d0/0x10d0 [ 32.374110] ? __fsnotify_parent+0xb4/0x3a0 [ 32.378403] ? fsnotify+0x1af0/0x1af0 [ 32.382179] ? __tun_detach+0x1390/0x1390 [ 32.386297] ? __tun_detach+0x1390/0x1390 [ 32.390416] rtnl_unlock+0xe/0x10 [ 32.393838] tun_chr_close+0x49/0x60 [ 32.397527] __fput+0x333/0x7f0 [ 32.400783] ? fput+0x140/0x140 [ 32.404034] ? check_same_owner+0x320/0x320 [ 32.408332] ____fput+0x15/0x20 [ 32.411583] task_work_run+0x199/0x270 [ 32.415443] ? task_work_cancel+0x210/0x210 [ 32.419734] ? free_nsproxy+0x185/0x1f0 [ 32.423682] ? switch_task_namespaces+0xa2/0xc0 [ 32.428325] do_exit+0xa52/0x1b40 [ 32.431749] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.436738] ? check_noncircular+0x20/0x20 [ 32.440949] ? mm_update_next_owner+0x930/0x930 [ 32.445591] ? __pmd_alloc+0x4e0/0x4e0 [ 32.449468] ? find_held_lock+0x39/0x1d0 [ 32.453510] ? lock_downgrade+0x990/0x990 [ 32.457653] ? handle_mm_fault+0x410/0x8d0 [ 32.461856] ? down_read_trylock+0xdb/0x170 [ 32.466148] ? __handle_mm_fault+0x39c0/0x39c0 [ 32.470712] ? vmacache_find+0x61/0x270 [ 32.474660] ? vmacache_update+0xfe/0x130 [ 32.478785] ? up_read+0x1a/0x40 [ 32.482125] ? __do_page_fault+0x35b/0xb60 [ 32.486331] ? do_vfs_ioctl+0x492/0x1530 [ 32.490370] ? do_page_fault+0xee/0x720 [ 32.494328] ? __do_page_fault+0xb60/0xb60 [ 32.498539] ? putname+0xf3/0x130 [ 32.501972] do_group_exit+0x149/0x400 [ 32.505835] ? lockdep_sys_exit+0x47/0xf0 [ 32.509952] ? SyS_exit+0x30/0x30 [ 32.513380] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.518372] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.523100] SyS_exit_group+0x1d/0x20 [ 32.526873] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.531618] RIP: 0033:0x445139 [ 32.534777] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 32.542459] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445139 [ 32.549698] RDX: 0000000000445139 RSI: 0000000020906fd8 RDI: 0000000000000001 [ 32.556937] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 32.564176] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000402790 [ 32.571414] R13: 0000000000402820 R14: 0000000000000000 R15: 0000000000000000 [ 32.578671] [ 32.580269] Allocated by task 2984: [ 32.583872] save_stack_trace+0x16/0x20 [ 32.587816] save_stack+0x43/0xd0 [ 32.591238] kasan_kmalloc+0xad/0xe0 [ 32.594920] __kmalloc_node+0x47/0x70 [ 32.598691] kvmalloc_node+0x64/0xd0 [ 32.602376] alloc_netdev_mqs+0x16e/0xed0 [ 32.606496] __tun_chr_ioctl+0x12be/0x3d20 [ 32.610700] tun_chr_ioctl+0x2a/0x40 [ 32.614381] do_vfs_ioctl+0x1b1/0x1530 [ 32.618236] SyS_ioctl+0x8f/0xc0 [ 32.621574] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.626293] [ 32.627889] Freed by task 2984: [ 32.631137] save_stack_trace+0x16/0x20 [ 32.635079] save_stack+0x43/0xd0 [ 32.638504] kasan_slab_free+0x71/0xc0 [ 32.642360] kfree+0xca/0x250 [ 32.645437] kvfree+0x36/0x60 [ 32.648511] free_netdev+0x2cf/0x360 [ 32.652192] __tun_chr_ioctl+0x2cf6/0x3d20 [ 32.656394] tun_chr_ioctl+0x2a/0x40 [ 32.660077] do_vfs_ioctl+0x1b1/0x1530 [ 32.663932] SyS_ioctl+0x8f/0xc0 [ 32.667268] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.671988] [ 32.673588] The buggy address belongs to the object at ffff8801ce1983c0 [ 32.673588] which belongs to the cache kmalloc-16384 of size 16384 [ 32.686558] The buggy address is located 13312 bytes inside of [ 32.686558] 16384-byte region [ffff8801ce1983c0, ffff8801ce19c3c0) [ 32.698745] The buggy address belongs to the page: [ 32.703651] page:ffffea0007386600 count:1 mapcount:0 mapping:ffff8801ce1983c0 index:0x0 compound_mapcount: 0 [ 32.713595] flags: 0x200000000008100(slab|head) [ 32.718233] raw: 0200000000008100 ffff8801ce1983c0 0000000000000000 0000000100000001 [ 32.726082] raw: ffffea000738f820 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 32.733929] page dumped because: kasan: bad access detected [ 32.739608] [ 32.741206] Memory state around the buggy address: [ 32.746102] ffff8801ce19b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.753428] ffff8801ce19b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.760753] >ffff8801ce19b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.768078] ^ [ 32.773497] ffff8801ce19b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.780822] ffff8801ce19b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.788147] ================================================================== [ 32.795486] Disabling lock debugging due to kernel taint [ 32.800899] Kernel panic - not syncing: panic_on_warn set ... [ 32.800899] [ 32.808224] CPU: 0 PID: 2984 Comm: syzkaller216077 Tainted: G B 4.13.0-next-20170911+ #19 [ 32.817636] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.826953] Call Trace: [ 32.829509] dump_stack+0x194/0x257 [ 32.833102] ? arch_local_irq_restore+0x53/0x53 [ 32.837735] ? vprintk_default+0x28/0x30 [ 32.841763] ? detach_if_pending+0x4c0/0x610 [ 32.846139] panic+0x1e4/0x417 [ 32.849296] ? __warn+0x1d9/0x1d9 [ 32.852718] ? detach_if_pending+0x557/0x610 [ 32.857090] kasan_end_report+0x50/0x50 [ 32.861039] kasan_report+0x137/0x340 [ 32.864808] __asan_report_store8_noabort+0x17/0x20 [ 32.869785] detach_if_pending+0x557/0x610 [ 32.873985] ? trace_raw_output_tick_stop+0x130/0x130 [ 32.879137] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 32.883767] ? lock_timer_base+0x1a3/0x2b0 [ 32.887964] ? lock_timer_base+0x1eb/0x2b0 [ 32.892164] ? __internal_add_timer+0x2d0/0x2d0 [ 32.896796] ? trace_hardirqs_on+0xd/0x10 [ 32.900912] try_to_del_timer_sync+0xa2/0x120 [ 32.905369] ? del_timer+0x130/0x130 [ 32.909048] ? del_timer_sync+0xeb/0x240 [ 32.913076] del_timer_sync+0x18a/0x240 [ 32.917015] tun_free_netdev+0x105/0x1b0 [ 32.921039] ? tun_xdp+0x410/0x410 [ 32.924543] ? cpumask_next+0x24/0x30 [ 32.928310] ? netdev_refcnt_read+0xed/0x150 [ 32.932684] ? tun_xdp+0x410/0x410 [ 32.936188] netdev_run_todo+0x870/0xca0 [ 32.940211] ? do_group_exit+0x149/0x400 [ 32.944250] ? register_netdev+0x30/0x30 [ 32.948276] ? lock_downgrade+0x990/0x990 [ 32.952390] ? trace_hardirqs_on+0xd/0x10 [ 32.956513] ? refcount_sub_and_test+0x115/0x1b0 [ 32.961232] ? refcount_inc+0x50/0x50 [ 32.964996] ? refcount_inc+0x50/0x50 [ 32.968761] ? sk_destruct+0x4c/0x80 [ 32.972439] ? __sk_free+0x5c/0x230 [ 32.976029] ? sk_free+0x2f/0x40 [ 32.979360] ? __tun_detach+0x176/0x1390 [ 32.983392] ? tun_attach+0xf90/0xf90 [ 32.987163] ? locks_remove_file+0x3fa/0x5a0 [ 32.991538] ? fcntl_setlk+0x10d0/0x10d0 [ 32.995565] ? __fsnotify_parent+0xb4/0x3a0 [ 32.999851] ? fsnotify+0x1af0/0x1af0 [ 33.003619] ? __tun_detach+0x1390/0x1390 [ 33.007732] ? __tun_detach+0x1390/0x1390 [ 33.011846] rtnl_unlock+0xe/0x10 [ 33.015263] tun_chr_close+0x49/0x60 [ 33.018941] __fput+0x333/0x7f0 [ 33.022187] ? fput+0x140/0x140 [ 33.025433] ? check_same_owner+0x320/0x320 [ 33.029721] ____fput+0x15/0x20 [ 33.032967] task_work_run+0x199/0x270 [ 33.036818] ? task_work_cancel+0x210/0x210 [ 33.041103] ? free_nsproxy+0x185/0x1f0 [ 33.045042] ? switch_task_namespaces+0xa2/0xc0 [ 33.049680] do_exit+0xa52/0x1b40 [ 33.053098] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.058078] ? check_noncircular+0x20/0x20 [ 33.062280] ? mm_update_next_owner+0x930/0x930 [ 33.066913] ? __pmd_alloc+0x4e0/0x4e0 [ 33.070771] ? find_held_lock+0x39/0x1d0 [ 33.074801] ? lock_downgrade+0x990/0x990 [ 33.078924] ? handle_mm_fault+0x410/0x8d0 [ 33.083121] ? down_read_trylock+0xdb/0x170 [ 33.087418] ? __handle_mm_fault+0x39c0/0x39c0 [ 33.091976] ? vmacache_find+0x61/0x270 [ 33.095914] ? vmacache_update+0xfe/0x130 [ 33.100028] ? up_read+0x1a/0x40 [ 33.103360] ? __do_page_fault+0x35b/0xb60 [ 33.107558] ? do_vfs_ioctl+0x492/0x1530 [ 33.111586] ? do_page_fault+0xee/0x720 [ 33.115526] ? __do_page_fault+0xb60/0xb60 [ 33.119723] ? putname+0xf3/0x130 [ 33.123141] do_group_exit+0x149/0x400 [ 33.126991] ? lockdep_sys_exit+0x47/0xf0 [ 33.131101] ? SyS_exit+0x30/0x30 [ 33.134519] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.139501] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.144225] SyS_exit_group+0x1d/0x20 [ 33.147991] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.152710] RIP: 0033:0x445139 [ 33.155865] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7