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-1,10.128.15.196' (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: [ 25.925293] ================================================================== [ 25.932732] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 25.939454] Write of size 8 at addr ffff8801ce6637c0 by task syzkaller863919/2983 [ 25.947041] [ 25.948651] CPU: 0 PID: 2983 Comm: syzkaller863919 Not tainted 4.13.0-next-20170907+ #17 [ 25.956849] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.966173] Call Trace: [ 25.968736] dump_stack+0x194/0x257 [ 25.972339] ? arch_local_irq_restore+0x53/0x53 [ 25.976978] ? show_regs_print_info+0x65/0x65 [ 25.981447] ? lock_timer_base+0x1a3/0x2b0 [ 25.985653] ? detach_if_pending+0x557/0x610 [ 25.990035] print_address_description+0x73/0x250 [ 25.994848] ? detach_if_pending+0x557/0x610 [ 25.999226] kasan_report+0x24e/0x340 [ 26.003001] __asan_report_store8_noabort+0x17/0x20 [ 26.007989] detach_if_pending+0x557/0x610 [ 26.012195] ? trace_raw_output_tick_stop+0x130/0x130 [ 26.017357] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 26.021994] ? lock_timer_base+0x1a3/0x2b0 [ 26.026202] ? lock_timer_base+0x1eb/0x2b0 [ 26.030411] ? __internal_add_timer+0x2d0/0x2d0 [ 26.035052] ? trace_hardirqs_on+0xd/0x10 [ 26.039193] try_to_del_timer_sync+0xa2/0x120 [ 26.043664] ? del_timer+0x130/0x130 [ 26.047349] ? del_timer_sync+0xeb/0x240 [ 26.051387] del_timer_sync+0x18a/0x240 [ 26.055333] tun_free_netdev+0x105/0x1b0 [ 26.059364] ? tun_xdp+0x410/0x410 [ 26.062873] ? cpumask_next+0x24/0x30 [ 26.066653] ? netdev_refcnt_read+0xed/0x150 [ 26.071033] ? tun_xdp+0x410/0x410 [ 26.074553] netdev_run_todo+0x870/0xca0 [ 26.078589] ? do_group_exit+0x149/0x400 [ 26.082625] ? register_netdev+0x30/0x30 [ 26.086662] ? lock_downgrade+0x990/0x990 [ 26.090783] ? trace_hardirqs_on+0xd/0x10 [ 26.094925] ? refcount_sub_and_test+0x115/0x1b0 [ 26.099653] ? refcount_inc+0x50/0x50 [ 26.103426] ? refcount_inc+0x50/0x50 [ 26.107206] ? sk_destruct+0x4c/0x80 [ 26.110892] ? __sk_free+0x5c/0x230 [ 26.114498] ? sk_free+0x2f/0x40 [ 26.117838] ? __tun_detach+0x176/0x1390 [ 26.121883] ? tun_attach+0xf90/0xf90 [ 26.125665] ? locks_remove_file+0x3fa/0x5a0 [ 26.130045] ? fcntl_setlk+0x10d0/0x10d0 [ 26.134080] ? __fsnotify_parent+0xb4/0x3a0 [ 26.138376] ? fsnotify+0x1af0/0x1af0 [ 26.142152] ? __tun_detach+0x1390/0x1390 [ 26.146270] ? __tun_detach+0x1390/0x1390 [ 26.150394] rtnl_unlock+0xe/0x10 [ 26.153814] tun_chr_close+0x49/0x60 [ 26.157499] __fput+0x333/0x7f0 [ 26.160759] ? fput+0x140/0x140 [ 26.164017] ? check_same_owner+0x320/0x320 [ 26.168323] ____fput+0x15/0x20 [ 26.171582] task_work_run+0x199/0x270 [ 26.175446] ? task_work_cancel+0x210/0x210 [ 26.179739] ? free_nsproxy+0x185/0x1f0 [ 26.183688] ? switch_task_namespaces+0xa2/0xc0 [ 26.188335] do_exit+0xa52/0x1b40 [ 26.191761] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 26.196756] ? check_noncircular+0x20/0x20 [ 26.200974] ? mm_update_next_owner+0x930/0x930 [ 26.205614] ? __pmd_alloc+0x4e0/0x4e0 [ 26.209485] ? find_held_lock+0x39/0x1d0 [ 26.213528] ? lock_downgrade+0x990/0x990 [ 26.217669] ? handle_mm_fault+0x410/0x8d0 [ 26.221874] ? down_read_trylock+0xdb/0x170 [ 26.226170] ? __handle_mm_fault+0x39c0/0x39c0 [ 26.230722] ? vmacache_find+0x61/0x270 [ 26.234672] ? up_read+0x1a/0x40 [ 26.238017] ? __do_page_fault+0x35b/0xb60 [ 26.242228] ? do_vfs_ioctl+0x492/0x1530 [ 26.246269] ? do_page_fault+0xee/0x720 [ 26.250214] ? __do_page_fault+0xb60/0xb60 [ 26.254421] ? putname+0xf3/0x130 [ 26.258899] do_group_exit+0x149/0x400 [ 26.262765] ? lockdep_sys_exit+0x47/0xf0 [ 26.266890] ? SyS_exit+0x30/0x30 [ 26.270323] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 26.275319] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.280053] SyS_exit_group+0x1d/0x20 [ 26.283837] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 26.288571] RIP: 0033:0x445159 [ 26.291732] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 26.299417] RAX: ffffffffffffffda RBX: 73b9e2a942250939 RCX: 0000000000445159 [ 26.306664] RDX: 0000000000445159 RSI: 00000000206d8fd8 RDI: 0000000000000001 [ 26.313905] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 26.321146] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027b0 [ 26.328386] R13: 0000000000402840 R14: 0000000000000000 R15: 0000000000000000 [ 26.335643] [ 26.337244] Allocated by task 2983: [ 26.340845] save_stack_trace+0x16/0x20 [ 26.344787] save_stack+0x43/0xd0 [ 26.348209] kasan_kmalloc+0xad/0xe0 [ 26.351894] __kmalloc_node+0x47/0x70 [ 26.355663] kvmalloc_node+0x64/0xd0 [ 26.359345] alloc_netdev_mqs+0x16e/0xed0 [ 26.363460] __tun_chr_ioctl+0x12be/0x3d20 [ 26.367662] tun_chr_ioctl+0x2a/0x40 [ 26.371343] do_vfs_ioctl+0x1b1/0x1530 [ 26.375197] SyS_ioctl+0x8f/0xc0 [ 26.378532] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 26.383254] [ 26.384850] Freed by task 2983: [ 26.388097] save_stack_trace+0x16/0x20 [ 26.392039] save_stack+0x43/0xd0 [ 26.395458] kasan_slab_free+0x71/0xc0 [ 26.399311] kfree+0xca/0x250 [ 26.402385] kvfree+0x36/0x60 [ 26.405460] free_netdev+0x2cf/0x360 [ 26.409149] __tun_chr_ioctl+0x2cf6/0x3d20 [ 26.413357] tun_chr_ioctl+0x2a/0x40 [ 26.417039] do_vfs_ioctl+0x1b1/0x1530 [ 26.420895] SyS_ioctl+0x8f/0xc0 [ 26.424230] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 26.428952] [ 26.430550] The buggy address belongs to the object at ffff8801ce6603c0 [ 26.430550] which belongs to the cache kmalloc-16384 of size 16384 [ 26.443529] The buggy address is located 13312 bytes inside of [ 26.443529] 16384-byte region [ffff8801ce6603c0, ffff8801ce6643c0) [ 26.455720] The buggy address belongs to the page: [ 26.460621] page:ffffea0007399800 count:1 mapcount:0 mapping:ffff8801ce6603c0 index:0x0 compound_mapcount: 0 [ 26.470562] flags: 0x200000000008100(slab|head) [ 26.475200] raw: 0200000000008100 ffff8801ce6603c0 0000000000000000 0000000100000001 [ 26.483052] raw: ffffea0007382c20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 26.490913] page dumped because: kasan: bad access detected [ 26.496587] [ 26.498185] Memory state around the buggy address: [ 26.503081] ffff8801ce663680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.510408] ffff8801ce663700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.517745] >ffff8801ce663780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.525078] ^ [ 26.530500] ffff8801ce663800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.537836] ffff8801ce663880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.545175] ================================================================== [ 26.552505] Disabling lock debugging due to kernel taint [ 26.557920] Kernel panic - not syncing: panic_on_warn set ... [ 26.557920] [ 26.565249] CPU: 0 PID: 2983 Comm: syzkaller863919 Tainted: G B 4.13.0-next-20170907+ #17 [ 26.574654] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 26.583972] Call Trace: [ 26.586529] dump_stack+0x194/0x257 [ 26.590123] ? arch_local_irq_restore+0x53/0x53 [ 26.594758] ? vprintk_default+0x28/0x30 [ 26.598784] ? detach_if_pending+0x530/0x610 [ 26.603164] panic+0x1e4/0x417 [ 26.606321] ? __warn+0x1d9/0x1d9 [ 26.609745] ? detach_if_pending+0x557/0x610 [ 26.614117] kasan_end_report+0x50/0x50 [ 26.618055] kasan_report+0x137/0x340 [ 26.621825] __asan_report_store8_noabort+0x17/0x20 [ 26.626814] detach_if_pending+0x557/0x610 [ 26.631013] ? trace_raw_output_tick_stop+0x130/0x130 [ 26.636167] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 26.640799] ? lock_timer_base+0x1a3/0x2b0 [ 26.645815] ? lock_timer_base+0x1eb/0x2b0 [ 26.650020] ? __internal_add_timer+0x2d0/0x2d0 [ 26.654666] ? trace_hardirqs_on+0xd/0x10 [ 26.658780] try_to_del_timer_sync+0xa2/0x120 [ 26.663248] ? del_timer+0x130/0x130 [ 26.666928] ? del_timer_sync+0xeb/0x240 [ 26.670957] del_timer_sync+0x18a/0x240 [ 26.674914] tun_free_netdev+0x105/0x1b0 [ 26.678938] ? tun_xdp+0x410/0x410 [ 26.682444] ? cpumask_next+0x24/0x30 [ 26.686213] ? netdev_refcnt_read+0xed/0x150 [ 26.690590] ? tun_xdp+0x410/0x410 [ 26.694096] netdev_run_todo+0x870/0xca0 [ 26.698123] ? do_group_exit+0x149/0x400 [ 26.702151] ? register_netdev+0x30/0x30 [ 26.706177] ? lock_downgrade+0x990/0x990 [ 26.710289] ? trace_hardirqs_on+0xd/0x10 [ 26.714412] ? refcount_sub_and_test+0x115/0x1b0 [ 26.719140] ? refcount_inc+0x50/0x50 [ 26.722915] ? refcount_inc+0x50/0x50 [ 26.726688] ? sk_destruct+0x4c/0x80 [ 26.730372] ? __sk_free+0x5c/0x230 [ 26.733969] ? sk_free+0x2f/0x40 [ 26.737300] ? __tun_detach+0x176/0x1390 [ 26.741523] ? tun_attach+0xf90/0xf90 [ 26.745303] ? locks_remove_file+0x3fa/0x5a0 [ 26.749677] ? fcntl_setlk+0x10d0/0x10d0 [ 26.753707] ? __fsnotify_parent+0xb4/0x3a0 [ 26.757993] ? fsnotify+0x1af0/0x1af0 [ 26.761763] ? __tun_detach+0x1390/0x1390 [ 26.765881] ? __tun_detach+0x1390/0x1390 [ 26.769997] rtnl_unlock+0xe/0x10 [ 26.773419] tun_chr_close+0x49/0x60 [ 26.777102] __fput+0x333/0x7f0 [ 26.780350] ? fput+0x140/0x140 [ 26.783610] ? check_same_owner+0x320/0x320 [ 26.787899] ____fput+0x15/0x20 [ 26.791154] task_work_run+0x199/0x270 [ 26.795007] ? task_work_cancel+0x210/0x210 [ 26.799297] ? free_nsproxy+0x185/0x1f0 [ 26.803235] ? switch_task_namespaces+0xa2/0xc0 [ 26.807886] do_exit+0xa52/0x1b40 [ 26.811305] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 26.816294] ? check_noncircular+0x20/0x20 [ 26.820496] ? mm_update_next_owner+0x930/0x930 [ 26.825133] ? __pmd_alloc+0x4e0/0x4e0 [ 26.829006] ? find_held_lock+0x39/0x1d0 [ 26.833042] ? lock_downgrade+0x990/0x990 [ 26.837165] ? handle_mm_fault+0x410/0x8d0 [ 26.841362] ? down_read_trylock+0xdb/0x170 [ 26.845647] ? __handle_mm_fault+0x39c0/0x39c0 [ 26.850194] ? vmacache_find+0x61/0x270 [ 26.854148] ? up_read+0x1a/0x40 [ 26.857494] ? __do_page_fault+0x35b/0xb60 [ 26.861691] ? do_vfs_ioctl+0x492/0x1530 [ 26.865722] ? do_page_fault+0xee/0x720 [ 26.869661] ? __do_page_fault+0xb60/0xb60 [ 26.873860] ? putname+0xf3/0x130 [ 26.877279] do_group_exit+0x149/0x400 [ 26.881132] ? lockdep_sys_exit+0x47/0xf0 [ 26.885250] ? SyS_exit+0x30/0x30 [ 26.888669] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 26.893652] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 26.898374] SyS_exit_group+0x1d/0x20 [ 26.902141] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 26.906862] RIP: 0033:0x445159 [ 26.910017] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 26.917693] RAX: ffffffffffffffda RBX: 73b9e2a942250939 RCX: 0000000000445159