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-386-3,10.128.0.60' (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.386337] ================================================================== [ 31.393747] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 31.400468] Write of size 8 at addr ffff8801ce60b740 by task syzkaller210841/2982 [ 31.408054] [ 31.409658] CPU: 1 PID: 2982 Comm: syzkaller210841 Not tainted 4.14.0-rc3+ #23 [ 31.416998] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.426328] Call Trace: [ 31.428894] dump_stack+0x194/0x257 [ 31.432500] ? arch_local_irq_restore+0x53/0x53 [ 31.437142] ? show_regs_print_info+0x65/0x65 [ 31.441615] ? lock_timer_base+0x1a3/0x2b0 [ 31.445826] ? detach_if_pending+0x557/0x610 [ 31.450208] print_address_description+0x73/0x250 [ 31.455023] ? detach_if_pending+0x557/0x610 [ 31.459405] kasan_report+0x25b/0x340 [ 31.463181] __asan_report_store8_noabort+0x17/0x20 [ 31.468166] detach_if_pending+0x557/0x610 [ 31.472374] ? trace_raw_output_tick_stop+0x130/0x130 [ 31.477543] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 31.482180] ? lock_timer_base+0x1a3/0x2b0 [ 31.486387] ? lock_timer_base+0x1eb/0x2b0 [ 31.490599] ? __internal_add_timer+0x2d0/0x2d0 [ 31.495240] ? trace_hardirqs_on+0xd/0x10 [ 31.499365] try_to_del_timer_sync+0xa2/0x120 [ 31.503829] ? del_timer+0x130/0x130 [ 31.507520] ? del_timer_sync+0xeb/0x240 [ 31.511556] del_timer_sync+0x18a/0x240 [ 31.515504] tun_free_netdev+0x105/0x1b0 [ 31.519538] ? tun_xdp+0x410/0x410 [ 31.523047] ? cpumask_next+0x24/0x30 [ 31.526820] ? netdev_refcnt_read+0xed/0x150 [ 31.531202] ? tun_xdp+0x410/0x410 [ 31.534709] netdev_run_todo+0x870/0xca0 [ 31.538738] ? do_group_exit+0x149/0x400 [ 31.542774] ? register_netdev+0x30/0x30 [ 31.546807] ? lock_downgrade+0x990/0x990 [ 31.550923] ? trace_hardirqs_on+0xd/0x10 [ 31.555058] ? refcount_sub_and_test+0x115/0x1b0 [ 31.559783] ? refcount_inc+0x50/0x50 [ 31.563553] ? refcount_inc+0x50/0x50 [ 31.567327] ? sk_destruct+0x4c/0x80 [ 31.571011] ? __sk_free+0x5c/0x230 [ 31.574614] ? sk_free+0x2f/0x40 [ 31.577951] ? __tun_detach+0x176/0x1390 [ 31.581992] ? tun_attach+0xf90/0xf90 [ 31.585787] ? do_raw_spin_trylock+0x190/0x190 [ 31.590342] ? locks_remove_file+0x3fa/0x5a0 [ 31.594721] ? fcntl_setlk+0x10d0/0x10d0 [ 31.598754] ? __fsnotify_parent+0xb4/0x3a0 [ 31.603047] ? fsnotify+0x1af0/0x1af0 [ 31.606826] ? __tun_detach+0x1390/0x1390 [ 31.610943] ? __tun_detach+0x1390/0x1390 [ 31.615061] rtnl_unlock+0xe/0x10 [ 31.618485] tun_chr_close+0x49/0x60 [ 31.622170] __fput+0x333/0x7f0 [ 31.625427] ? fput+0x140/0x140 [ 31.628680] ? check_same_owner+0x320/0x320 [ 31.632971] ? _raw_spin_unlock_irq+0x27/0x70 [ 31.637443] ____fput+0x15/0x20 [ 31.640692] task_work_run+0x199/0x270 [ 31.644551] ? task_work_cancel+0x210/0x210 [ 31.648843] ? _raw_spin_unlock+0x22/0x30 [ 31.652961] ? switch_task_namespaces+0x87/0xc0 [ 31.657605] do_exit+0x9d2/0x1af0 [ 31.661027] ? __handle_mm_fault+0xf07/0x39c0 [ 31.665495] ? mm_update_next_owner+0x930/0x930 [ 31.670137] ? lock_release+0xd70/0xd70 [ 31.674089] ? check_noncircular+0x20/0x20 [ 31.678296] ? kfree+0xe4/0x250 [ 31.681548] ? kvfree+0x36/0x60 [ 31.684806] ? check_noncircular+0x20/0x20 [ 31.689017] ? __handle_mm_fault+0x587/0x39c0 [ 31.693487] ? __pmd_alloc+0x4e0/0x4e0 [ 31.697357] ? find_held_lock+0x39/0x1d0 [ 31.701397] ? lock_downgrade+0x990/0x990 [ 31.705539] ? handle_mm_fault+0x410/0x8d0 [ 31.709741] ? down_read_trylock+0xdb/0x170 [ 31.714047] ? __do_page_fault+0x31e/0xd60 [ 31.718268] ? __handle_mm_fault+0x39c0/0x39c0 [ 31.722828] ? vmacache_find+0x5f/0x280 [ 31.726770] ? vmacache_update+0xfe/0x130 [ 31.730893] do_group_exit+0x149/0x400 [ 31.734749] ? __do_page_fault+0x3d6/0xd60 [ 31.738953] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 31.743332] ? SyS_exit+0x30/0x30 [ 31.746760] ? do_fast_syscall_32+0x158/0xf05 [ 31.751223] ? do_group_exit+0x400/0x400 [ 31.755256] SyS_exit_group+0x1d/0x20 [ 31.759027] do_fast_syscall_32+0x3f2/0xf05 [ 31.763325] ? do_int80_syscall_32+0x940/0x940 [ 31.767876] ? kasan_check_read+0x11/0x20 [ 31.771997] ? syscall_return_slowpath+0x510/0x510 [ 31.776897] ? SyS_rt_sigaction+0x94/0x1b0 [ 31.781105] ? lockdep_sys_exit+0x47/0xf0 [ 31.785223] ? retint_user+0x18/0x20 [ 31.788912] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 31.793730] entry_SYSENTER_compat+0x51/0x60 [ 31.798107] RIP: 0023:0xf7f2bc79 [ 31.801439] RSP: 002b:00000000ffa30e6c EFLAGS: 00000296 ORIG_RAX: 00000000000000fc [ 31.809377] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f1298 [ 31.816623] RDX: 0000000000000000 RSI: 00000000080dae18 RDI: 00000000080f12a0 [ 31.823861] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 31.831100] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 31.838426] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 31.845682] [ 31.847279] Allocated by task 2982: [ 31.850876] save_stack_trace+0x16/0x20 [ 31.854822] save_stack+0x43/0xd0 [ 31.858243] kasan_kmalloc+0xad/0xe0 [ 31.861923] __kmalloc_node+0x47/0x70 [ 31.865691] kvmalloc_node+0x64/0xd0 [ 31.869373] alloc_netdev_mqs+0x16e/0xed0 [ 31.873491] __tun_chr_ioctl+0x12be/0x3d20 [ 31.877692] tun_chr_compat_ioctl+0x29/0x30 [ 31.881984] compat_SyS_ioctl+0x1d7/0x3290 [ 31.886189] do_fast_syscall_32+0x3f2/0xf05 [ 31.890479] entry_SYSENTER_compat+0x51/0x60 [ 31.894853] [ 31.896449] Freed by task 2982: [ 31.899694] save_stack_trace+0x16/0x20 [ 31.903635] save_stack+0x43/0xd0 [ 31.907053] kasan_slab_free+0x71/0xc0 [ 31.910908] kfree+0xca/0x250 [ 31.913981] kvfree+0x36/0x60 [ 31.917058] free_netdev+0x2cf/0x360 [ 31.920738] __tun_chr_ioctl+0x2cf6/0x3d20 [ 31.924939] tun_chr_compat_ioctl+0x29/0x30 [ 31.929231] compat_SyS_ioctl+0x1d7/0x3290 [ 31.933432] do_fast_syscall_32+0x3f2/0xf05 [ 31.937723] entry_SYSENTER_compat+0x51/0x60 [ 31.942095] [ 31.943692] The buggy address belongs to the object at ffff8801ce608340 [ 31.943692] which belongs to the cache kmalloc-16384 of size 16384 [ 31.956664] The buggy address is located 13312 bytes inside of [ 31.956664] 16384-byte region [ffff8801ce608340, ffff8801ce60c340) [ 31.968850] The buggy address belongs to the page: [ 31.973750] page:ffffea0007398200 count:1 mapcount:0 mapping:ffff8801ce608340 index:0x0 compound_mapcount: 0 [ 31.983691] flags: 0x200000000008100(slab|head) [ 31.988329] raw: 0200000000008100 ffff8801ce608340 0000000000000000 0000000100000001 [ 31.996179] raw: ffffea00073dd420 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 32.004023] page dumped because: kasan: bad access detected [ 32.009700] [ 32.011296] Memory state around the buggy address: [ 32.016192] ffff8801ce60b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.023518] ffff8801ce60b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.030843] >ffff8801ce60b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.038167] ^ [ 32.043583] ffff8801ce60b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.050909] ffff8801ce60b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.058233] ================================================================== [ 32.065567] Disabling lock debugging due to kernel taint [ 32.070980] Kernel panic - not syncing: panic_on_warn set ... [ 32.070980] [ 32.078305] CPU: 1 PID: 2982 Comm: syzkaller210841 Tainted: G B 4.14.0-rc3+ #23 [ 32.086839] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.096158] Call Trace: [ 32.098716] dump_stack+0x194/0x257 [ 32.102308] ? arch_local_irq_restore+0x53/0x53 [ 32.106943] ? vprintk_default+0x28/0x30 [ 32.110970] ? detach_if_pending+0x500/0x610 [ 32.115342] panic+0x1e4/0x417 [ 32.118499] ? __warn+0x1d9/0x1d9 [ 32.121921] ? detach_if_pending+0x557/0x610 [ 32.126293] kasan_end_report+0x50/0x50 [ 32.130243] kasan_report+0x144/0x340 [ 32.134009] __asan_report_store8_noabort+0x17/0x20 [ 32.138988] detach_if_pending+0x557/0x610 [ 32.143188] ? trace_raw_output_tick_stop+0x130/0x130 [ 32.148343] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 32.152972] ? lock_timer_base+0x1a3/0x2b0 [ 32.157181] ? lock_timer_base+0x1eb/0x2b0 [ 32.161383] ? __internal_add_timer+0x2d0/0x2d0 [ 32.166018] ? trace_hardirqs_on+0xd/0x10 [ 32.170134] try_to_del_timer_sync+0xa2/0x120 [ 32.174592] ? del_timer+0x130/0x130 [ 32.178269] ? del_timer_sync+0xeb/0x240 [ 32.182294] del_timer_sync+0x18a/0x240 [ 32.186235] tun_free_netdev+0x105/0x1b0 [ 32.190257] ? tun_xdp+0x410/0x410 [ 32.193759] ? cpumask_next+0x24/0x30 [ 32.197526] ? netdev_refcnt_read+0xed/0x150 [ 32.201897] ? tun_xdp+0x410/0x410 [ 32.205403] netdev_run_todo+0x870/0xca0 [ 32.209426] ? do_group_exit+0x149/0x400 [ 32.213455] ? register_netdev+0x30/0x30 [ 32.217480] ? lock_downgrade+0x990/0x990 [ 32.221594] ? trace_hardirqs_on+0xd/0x10 [ 32.225713] ? refcount_sub_and_test+0x115/0x1b0 [ 32.230432] ? refcount_inc+0x50/0x50 [ 32.234194] ? refcount_inc+0x50/0x50 [ 32.237962] ? sk_destruct+0x4c/0x80 [ 32.241637] ? __sk_free+0x5c/0x230 [ 32.245226] ? sk_free+0x2f/0x40 [ 32.248555] ? __tun_detach+0x176/0x1390 [ 32.252584] ? tun_attach+0xf90/0xf90 [ 32.256352] ? do_raw_spin_trylock+0x190/0x190 [ 32.260901] ? locks_remove_file+0x3fa/0x5a0 [ 32.265275] ? fcntl_setlk+0x10d0/0x10d0 [ 32.269300] ? __fsnotify_parent+0xb4/0x3a0 [ 32.273584] ? fsnotify+0x1af0/0x1af0 [ 32.277349] ? __tun_detach+0x1390/0x1390 [ 32.281465] ? __tun_detach+0x1390/0x1390 [ 32.285576] rtnl_unlock+0xe/0x10 [ 32.288992] tun_chr_close+0x49/0x60 [ 32.292668] __fput+0x333/0x7f0 [ 32.295913] ? fput+0x140/0x140 [ 32.299158] ? check_same_owner+0x320/0x320 [ 32.303442] ? _raw_spin_unlock_irq+0x27/0x70 [ 32.307906] ____fput+0x15/0x20 [ 32.311149] task_work_run+0x199/0x270 [ 32.315003] ? task_work_cancel+0x210/0x210 [ 32.319286] ? _raw_spin_unlock+0x22/0x30 [ 32.323399] ? switch_task_namespaces+0x87/0xc0 [ 32.328042] do_exit+0x9d2/0x1af0 [ 32.331460] ? __handle_mm_fault+0xf07/0x39c0 [ 32.335920] ? mm_update_next_owner+0x930/0x930 [ 32.340553] ? lock_release+0xd70/0xd70 [ 32.344494] ? check_noncircular+0x20/0x20 [ 32.348693] ? kfree+0xe4/0x250 [ 32.351935] ? kvfree+0x36/0x60 [ 32.355182] ? check_noncircular+0x20/0x20 [ 32.359381] ? __handle_mm_fault+0x587/0x39c0 [ 32.363840] ? __pmd_alloc+0x4e0/0x4e0 [ 32.367694] ? find_held_lock+0x39/0x1d0 [ 32.371724] ? lock_downgrade+0x990/0x990 [ 32.375845] ? handle_mm_fault+0x410/0x8d0 [ 32.380043] ? down_read_trylock+0xdb/0x170 [ 32.384331] ? __do_page_fault+0x31e/0xd60