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-0,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: [ 31.096382] ================================================================== [ 31.103813] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 31.110539] Write of size 8 at addr ffff8801ce28b740 by task syzkaller119486/2979 [ 31.118124] [ 31.119812] CPU: 1 PID: 2979 Comm: syzkaller119486 Not tainted 4.13.0-next-20170912+ #20 [ 31.128013] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.137338] Call Trace: [ 31.139898] dump_stack+0x194/0x257 [ 31.143500] ? arch_local_irq_restore+0x53/0x53 [ 31.148139] ? show_regs_print_info+0x65/0x65 [ 31.152611] ? lock_timer_base+0x1a3/0x2b0 [ 31.156832] ? detach_if_pending+0x557/0x610 [ 31.161238] print_address_description+0x73/0x250 [ 31.166050] ? detach_if_pending+0x557/0x610 [ 31.170427] kasan_report+0x24e/0x340 [ 31.174202] __asan_report_store8_noabort+0x17/0x20 [ 31.179186] detach_if_pending+0x557/0x610 [ 31.183392] ? trace_raw_output_tick_stop+0x130/0x130 [ 31.188564] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 31.193202] ? lock_timer_base+0x1a3/0x2b0 [ 31.197406] ? lock_timer_base+0x1eb/0x2b0 [ 31.201619] ? __internal_add_timer+0x2d0/0x2d0 [ 31.206264] ? trace_hardirqs_on+0xd/0x10 [ 31.210390] try_to_del_timer_sync+0xa2/0x120 [ 31.214855] ? del_timer+0x130/0x130 [ 31.218543] ? del_timer_sync+0xeb/0x240 [ 31.222581] del_timer_sync+0x18a/0x240 [ 31.226532] tun_free_netdev+0x105/0x1b0 [ 31.230567] ? tun_xdp+0x410/0x410 [ 31.234077] ? cpumask_next+0x24/0x30 [ 31.237849] ? netdev_refcnt_read+0xed/0x150 [ 31.242230] ? tun_xdp+0x410/0x410 [ 31.245739] netdev_run_todo+0x870/0xca0 [ 31.249770] ? do_group_exit+0x149/0x400 [ 31.253814] ? register_netdev+0x30/0x30 [ 31.257848] ? lock_downgrade+0x990/0x990 [ 31.261965] ? trace_hardirqs_on+0xd/0x10 [ 31.266102] ? refcount_sub_and_test+0x115/0x1b0 [ 31.270825] ? refcount_inc+0x50/0x50 [ 31.274597] ? refcount_inc+0x50/0x50 [ 31.278373] ? sk_destruct+0x4c/0x80 [ 31.282055] ? __sk_free+0x5c/0x230 [ 31.285653] ? sk_free+0x2f/0x40 [ 31.288989] ? __tun_detach+0x176/0x1390 [ 31.293030] ? tun_attach+0xf90/0xf90 [ 31.296803] ? do_raw_spin_trylock+0x190/0x190 [ 31.301364] ? locks_remove_file+0x3fa/0x5a0 [ 31.305744] ? fcntl_setlk+0x10d0/0x10d0 [ 31.309776] ? __fsnotify_parent+0xb4/0x3a0 [ 31.314069] ? fsnotify+0x1af0/0x1af0 [ 31.317845] ? __tun_detach+0x1390/0x1390 [ 31.322126] ? __tun_detach+0x1390/0x1390 [ 31.326248] rtnl_unlock+0xe/0x10 [ 31.329668] tun_chr_close+0x49/0x60 [ 31.333354] __fput+0x333/0x7f0 [ 31.336609] ? fput+0x140/0x140 [ 31.339874] ? check_same_owner+0x320/0x320 [ 31.344163] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.348633] ____fput+0x15/0x20 [ 31.351880] task_work_run+0x199/0x270 [ 31.355740] ? task_work_cancel+0x210/0x210 [ 31.360037] ? _raw_spin_unlock+0x22/0x30 [ 31.364156] ? switch_task_namespaces+0x87/0xc0 [ 31.368799] do_exit+0xa52/0x1b40 [ 31.372226] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.377215] ? check_noncircular+0x20/0x20 [ 31.381427] ? mm_update_next_owner+0x930/0x930 [ 31.386065] ? __pmd_alloc+0x4e0/0x4e0 [ 31.389933] ? find_held_lock+0x39/0x1d0 [ 31.393975] ? lock_downgrade+0x990/0x990 [ 31.398115] ? handle_mm_fault+0x410/0x8d0 [ 31.402318] ? down_read_trylock+0xdb/0x170 [ 31.406609] ? __handle_mm_fault+0x39c0/0x39c0 [ 31.411158] ? vmacache_find+0x61/0x270 [ 31.415109] ? up_read+0x1a/0x40 [ 31.418452] ? __do_page_fault+0x35b/0xb60 [ 31.422658] ? do_vfs_ioctl+0x492/0x1530 [ 31.426698] ? do_page_fault+0xee/0x720 [ 31.430643] ? __do_page_fault+0xb60/0xb60 [ 31.434847] ? putname+0xf3/0x130 [ 31.438279] do_group_exit+0x149/0x400 [ 31.442142] ? lockdep_sys_exit+0x47/0xf0 [ 31.446257] ? SyS_exit+0x30/0x30 [ 31.449681] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 31.454669] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 31.459397] SyS_exit_group+0x1d/0x20 [ 31.463169] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 31.467893] RIP: 0033:0x443648 [ 31.471052] RSP: 002b:00007fff327b25a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 31.478731] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443648 [ 31.485969] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 31.493208] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 31.500449] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 31.507688] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 31.514945] [ 31.516544] Allocated by task 2979: [ 31.520140] save_stack_trace+0x16/0x20 [ 31.524085] save_stack+0x43/0xd0 [ 31.527505] kasan_kmalloc+0xad/0xe0 [ 31.531185] __kmalloc_node+0x47/0x70 [ 31.534953] kvmalloc_node+0x64/0xd0 [ 31.538635] alloc_netdev_mqs+0x16e/0xed0 [ 31.542750] __tun_chr_ioctl+0x12be/0x3d20 [ 31.546950] tun_chr_ioctl+0x2a/0x40 [ 31.550631] do_vfs_ioctl+0x1b1/0x1530 [ 31.554484] SyS_ioctl+0x8f/0xc0 [ 31.557818] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 31.562540] [ 31.564134] Freed by task 2979: [ 31.567381] save_stack_trace+0x16/0x20 [ 31.571321] save_stack+0x43/0xd0 [ 31.574740] kasan_slab_free+0x71/0xc0 [ 31.578594] kfree+0xca/0x250 [ 31.581667] kvfree+0x36/0x60 [ 31.584741] free_netdev+0x2cf/0x360 [ 31.588421] __tun_chr_ioctl+0x2cf6/0x3d20 [ 31.592622] tun_chr_ioctl+0x2a/0x40 [ 31.596310] do_vfs_ioctl+0x1b1/0x1530 [ 31.600165] SyS_ioctl+0x8f/0xc0 [ 31.603500] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 31.608221] [ 31.609818] The buggy address belongs to the object at ffff8801ce288340 [ 31.609818] which belongs to the cache kmalloc-16384 of size 16384 [ 31.622797] The buggy address is located 13312 bytes inside of [ 31.622797] 16384-byte region [ffff8801ce288340, ffff8801ce28c340) [ 31.634984] The buggy address belongs to the page: [ 31.639880] page:ffffea000738a200 count:1 mapcount:0 mapping:ffff8801ce288340 index:0x0 compound_mapcount: 0 [ 31.649819] flags: 0x200000000008100(slab|head) [ 31.654456] raw: 0200000000008100 ffff8801ce288340 0000000000000000 0000000100000001 [ 31.662305] raw: ffffea0007355620 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 31.670152] page dumped because: kasan: bad access detected [ 31.675827] [ 31.677423] Memory state around the buggy address: [ 31.682320] ffff8801ce28b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.689644] ffff8801ce28b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.696970] >ffff8801ce28b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.704296] ^ [ 31.709714] ffff8801ce28b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.717040] ffff8801ce28b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 31.724368] ================================================================== [ 31.731692] Disabling lock debugging due to kernel taint [ 31.737105] Kernel panic - not syncing: panic_on_warn set ... [ 31.737105] [ 31.744430] CPU: 1 PID: 2979 Comm: syzkaller119486 Tainted: G B 4.13.0-next-20170912+ #20 [ 31.753832] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.763149] Call Trace: [ 31.765711] dump_stack+0x194/0x257 [ 31.769306] ? arch_local_irq_restore+0x53/0x53 [ 31.773938] ? vprintk_default+0x28/0x30 [ 31.777967] ? detach_if_pending+0x4c0/0x610 [ 31.782343] panic+0x1e4/0x417 [ 31.785500] ? __warn+0x1d9/0x1d9 [ 31.788926] ? detach_if_pending+0x557/0x610 [ 31.793297] kasan_end_report+0x50/0x50 [ 31.797233] kasan_report+0x137/0x340 [ 31.800999] __asan_report_store8_noabort+0x17/0x20 [ 31.805977] detach_if_pending+0x557/0x610 [ 31.810177] ? trace_raw_output_tick_stop+0x130/0x130 [ 31.815331] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 31.819962] ? lock_timer_base+0x1a3/0x2b0 [ 31.824158] ? lock_timer_base+0x1eb/0x2b0 [ 31.828360] ? __internal_add_timer+0x2d0/0x2d0 [ 31.832994] ? trace_hardirqs_on+0xd/0x10 [ 31.837108] try_to_del_timer_sync+0xa2/0x120 [ 31.841567] ? del_timer+0x130/0x130 [ 31.845248] ? del_timer_sync+0xeb/0x240 [ 31.849275] del_timer_sync+0x18a/0x240 [ 31.853213] tun_free_netdev+0x105/0x1b0 [ 31.857236] ? tun_xdp+0x410/0x410 [ 31.860737] ? cpumask_next+0x24/0x30 [ 31.864504] ? netdev_refcnt_read+0xed/0x150 [ 31.868878] ? tun_xdp+0x410/0x410 [ 31.872381] netdev_run_todo+0x870/0xca0 [ 31.876407] ? do_group_exit+0x149/0x400 [ 31.880432] ? register_netdev+0x30/0x30 [ 31.884457] ? lock_downgrade+0x990/0x990 [ 31.888570] ? trace_hardirqs_on+0xd/0x10 [ 31.892704] ? refcount_sub_and_test+0x115/0x1b0 [ 31.897423] ? refcount_inc+0x50/0x50 [ 31.901186] ? refcount_inc+0x50/0x50 [ 31.904953] ? sk_destruct+0x4c/0x80 [ 31.908630] ? __sk_free+0x5c/0x230 [ 31.912223] ? sk_free+0x2f/0x40 [ 31.915559] ? __tun_detach+0x176/0x1390 [ 31.919588] ? tun_attach+0xf90/0xf90 [ 31.923355] ? do_raw_spin_trylock+0x190/0x190 [ 31.927903] ? locks_remove_file+0x3fa/0x5a0 [ 31.932277] ? fcntl_setlk+0x10d0/0x10d0 [ 31.936302] ? __fsnotify_parent+0xb4/0x3a0 [ 31.940589] ? fsnotify+0x1af0/0x1af0 [ 31.944353] ? __tun_detach+0x1390/0x1390 [ 31.948463] ? __tun_detach+0x1390/0x1390 [ 31.952576] rtnl_unlock+0xe/0x10 [ 31.955992] tun_chr_close+0x49/0x60 [ 31.959670] __fput+0x333/0x7f0 [ 31.962914] ? fput+0x140/0x140 [ 31.966167] ? check_same_owner+0x320/0x320 [ 31.970452] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.974913] ____fput+0x15/0x20 [ 31.978166] task_work_run+0x199/0x270 [ 31.982017] ? task_work_cancel+0x210/0x210 [ 31.986303] ? _raw_spin_unlock+0x22/0x30 [ 31.990415] ? switch_task_namespaces+0x87/0xc0 [ 31.995053] do_exit+0xa52/0x1b40 [ 31.998473] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.003453] ? check_noncircular+0x20/0x20 [ 32.007655] ? mm_update_next_owner+0x930/0x930 [ 32.012286] ? __pmd_alloc+0x4e0/0x4e0 [ 32.016140] ? find_held_lock+0x39/0x1d0 [ 32.020180] ? lock_downgrade+0x990/0x990 [ 32.024302] ? handle_mm_fault+0x410/0x8d0 [ 32.028497] ? down_read_trylock+0xdb/0x170 [ 32.032781] ? __handle_mm_fault+0x39c0/0x39c0 [ 32.037324] ? vmacache_find+0x61/0x270 [ 32.041262] ? up_read+0x1a/0x40 [ 32.044591] ? __do_page_fault+0x35b/0xb60 [ 32.048796] ? do_vfs_ioctl+0x492/0x1530 [ 32.052823] ? do_page_fault+0xee/0x720 [ 32.056760] ? __do_page_fault+0xb60/0xb60 [ 32.060956] ? putname+0xf3/0x130 [ 32.064375] do_group_exit+0x149/0x400 [ 32.068233] ? lockdep_sys_exit+0x47/0xf0 [ 32.072342] ? SyS_exit+0x30/0x30 [ 32.075761] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 32.080741] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 32.085460] SyS_exit_group+0x1d/0x20 [ 32.089224] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.093943] RIP: 0033:0x443648