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-2,10.128.15.234' (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: [ 59.313239] ================================================================== [ 59.314411] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 59.315311] Write of size 8 at addr ffff8801d12f36f8 by task syzkaller717241/2981 [ 59.316306] [ 59.316539] CPU: 0 PID: 2981 Comm: syzkaller717241 Not tainted 4.14.0-rc5+ #47 [ 59.317504] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 59.318724] Call Trace: [ 59.319082] dump_stack+0x194/0x257 [ 59.319575] ? arch_local_irq_restore+0x53/0x53 [ 59.320199] ? show_regs_print_info+0x65/0x65 [ 59.320826] ? lock_acquire+0x1d5/0x580 [ 59.321360] ? lock_timer_base+0x1a3/0x2b0 [ 59.321928] ? detach_if_pending+0x557/0x610 [ 59.322530] print_address_description+0x73/0x250 [ 59.323175] ? detach_if_pending+0x557/0x610 [ 59.323799] kasan_report+0x25b/0x340 [ 59.324315] __asan_report_store8_noabort+0x17/0x20 [ 59.324980] detach_if_pending+0x557/0x610 [ 59.325551] ? trace_raw_output_tick_stop+0x130/0x130 [ 59.326244] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 59.326864] ? lock_timer_base+0x1a3/0x2b0 [ 59.327435] ? lock_timer_base+0x1eb/0x2b0 [ 59.328007] ? __internal_add_timer+0x2d0/0x2d0 [ 59.328631] ? lock_downgrade+0x990/0x990 [ 59.329213] ? trace_hardirqs_on+0xd/0x10 [ 59.329778] try_to_del_timer_sync+0xa2/0x120 [ 59.330381] ? del_timer+0x130/0x130 [ 59.330942] ? del_timer_sync+0xeb/0x240 [ 59.331497] del_timer_sync+0x18a/0x240 [ 59.332047] tun_free_netdev+0x105/0x1b0 [ 59.332592] ? tun_xdp+0x410/0x410 [ 59.333068] ? cpumask_next+0x24/0x30 [ 59.334590] ? netdev_refcnt_read+0xed/0x150 [ 59.338970] ? tun_xdp+0x410/0x410 [ 59.342482] netdev_run_todo+0x870/0xca0 [ 59.346517] ? do_group_exit+0x149/0x400 [ 59.350554] ? mark_held_locks+0xaf/0x100 [ 59.354674] ? register_netdev+0x30/0x30 [ 59.358707] ? find_held_lock+0x35/0x1d0 [ 59.362746] ? lock_downgrade+0x990/0x990 [ 59.366871] ? refcount_sub_and_test+0x115/0x1b0 [ 59.371599] ? refcount_inc+0x50/0x50 [ 59.375366] ? refcount_inc+0x50/0x50 [ 59.379142] ? sk_destruct+0x4c/0x80 [ 59.382823] ? __sk_free+0x5c/0x230 [ 59.386423] ? sk_free+0x2f/0x40 [ 59.389758] ? __tun_detach+0x176/0x1390 [ 59.393797] ? tun_attach+0xfa0/0xfa0 [ 59.397569] ? check_noncircular+0x20/0x20 [ 59.401780] ? locks_remove_file+0x3fa/0x5a0 [ 59.406157] ? fcntl_setlk+0x10c0/0x10c0 [ 59.410184] ? kmem_cache_free+0x77/0x280 [ 59.414303] ? __fsnotify_parent+0xb4/0x3a0 [ 59.418596] ? fsnotify+0x1af0/0x1af0 [ 59.422366] ? __tun_detach+0x1390/0x1390 [ 59.426480] ? __tun_detach+0x1390/0x1390 [ 59.430597] rtnl_unlock+0xe/0x10 [ 59.434016] tun_chr_close+0x49/0x60 [ 59.437700] __fput+0x327/0x7e0 [ 59.440953] ? fput+0x140/0x140 [ 59.444201] ? _raw_spin_unlock_irq+0x27/0x70 [ 59.448668] ____fput+0x15/0x20 [ 59.451917] task_work_run+0x199/0x270 [ 59.455777] ? task_work_cancel+0x210/0x210 [ 59.460066] ? _raw_spin_unlock+0x22/0x30 [ 59.464182] ? switch_task_namespaces+0x87/0xc0 [ 59.468824] do_exit+0x9b5/0x1ad0 [ 59.472249] ? __handle_mm_fault+0xf07/0x39c0 [ 59.476717] ? mm_update_next_owner+0x930/0x930 [ 59.481360] ? lock_release+0xa40/0xa40 [ 59.485303] ? do_raw_spin_trylock+0x190/0x190 [ 59.489866] ? preempt_notifier_dec+0x20/0x20 [ 59.494343] ? __handle_mm_fault+0x587/0x39c0 [ 59.498812] ? check_noncircular+0x20/0x20 [ 59.503012] ? __pmd_alloc+0x4e0/0x4e0 [ 59.506870] ? to_ratio+0x30/0x30 [ 59.510295] ? find_held_lock+0x35/0x1d0 [ 59.514332] ? handle_mm_fault+0x248/0x8d0 [ 59.518537] ? find_held_lock+0x35/0x1d0 [ 59.522573] ? __do_page_fault+0x64c/0xd60 [ 59.526776] ? lock_downgrade+0x990/0x990 [ 59.530898] ? handle_mm_fault+0x410/0x8d0 [ 59.535097] ? down_read_trylock+0xdb/0x170 [ 59.539385] ? __do_page_fault+0x31e/0xd60 [ 59.543588] ? __handle_mm_fault+0x39c0/0x39c0 [ 59.548136] ? vmacache_find+0x5f/0x280 [ 59.552076] ? vmacache_update+0xfe/0x130 [ 59.556199] do_group_exit+0x149/0x400 [ 59.560053] ? __do_page_fault+0x3d6/0xd60 [ 59.564256] ? exit_to_usermode_loop+0x198/0x310 [ 59.568979] ? SyS_exit+0x30/0x30 [ 59.572405] ? do_fast_syscall_32+0x158/0xf05 [ 59.576872] ? do_group_exit+0x400/0x400 [ 59.580905] SyS_exit_group+0x1d/0x20 [ 59.584679] do_fast_syscall_32+0x3f2/0xf05 [ 59.588976] ? do_int80_syscall_32+0x940/0x940 [ 59.593528] ? kasan_check_read+0x11/0x20 [ 59.597645] ? do_syscall_64+0x8d0/0x8d0 [ 59.601680] ? SyS_rt_sigaction+0x94/0x1b0 [ 59.605884] ? SyS_sigprocmask+0x4b0/0x4b0 [ 59.610085] ? SyS_read+0x184/0x220 [ 59.613681] ? retint_user+0x18/0x20 [ 59.617366] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 59.622182] entry_SYSENTER_compat+0x51/0x60 [ 59.626557] RIP: 0023:0xf7f51c79 [ 59.629890] RSP: 002b:00000000ffc586ac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 59.637568] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000008210318 [ 59.644805] RDX: 0000000000000000 RSI: 00000000080dc2b8 RDI: 0000000008210320 [ 59.652043] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 59.659280] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 59.666517] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 59.673773] [ 59.675370] Allocated by task 3005: [ 59.678970] save_stack_trace+0x16/0x20 [ 59.682912] save_stack+0x43/0xd0 [ 59.686331] kasan_kmalloc+0xad/0xe0 [ 59.690011] __kmalloc_node+0x47/0x70 [ 59.693778] kvmalloc_node+0x64/0xd0 [ 59.697463] alloc_netdev_mqs+0x16e/0xed0 [ 59.701580] __tun_chr_ioctl+0x12b2/0x3d20 [ 59.705781] tun_chr_compat_ioctl+0x29/0x30 [ 59.710072] compat_SyS_ioctl+0x1d7/0x3290 [ 59.714275] do_fast_syscall_32+0x3f2/0xf05 [ 59.718565] entry_SYSENTER_compat+0x51/0x60 [ 59.722937] [ 59.724532] Freed by task 3005: [ 59.727780] save_stack_trace+0x16/0x20 [ 59.731719] save_stack+0x43/0xd0 [ 59.735137] kasan_slab_free+0x71/0xc0 [ 59.738988] kfree+0xca/0x250 [ 59.742061] kvfree+0x36/0x60 [ 59.745135] free_netdev+0x2cf/0x360 [ 59.748814] __tun_chr_ioctl+0x2cea/0x3d20 [ 59.753016] tun_chr_compat_ioctl+0x29/0x30 [ 59.757302] compat_SyS_ioctl+0x1d7/0x3290 [ 59.761505] do_fast_syscall_32+0x3f2/0xf05 [ 59.765792] entry_SYSENTER_compat+0x51/0x60 [ 59.770162] [ 59.771756] The buggy address belongs to the object at ffff8801d12f03c0 [ 59.771756] which belongs to the cache kmalloc-16384 of size 16384 [ 59.784724] The buggy address is located 13112 bytes inside of [ 59.784724] 16384-byte region [ffff8801d12f03c0, ffff8801d12f43c0) [ 59.796911] The buggy address belongs to the page: [ 59.801808] page:ffffea000744bc00 count:1 mapcount:0 mapping:ffff8801d12f03c0 index:0x0 compound_mapcount: 0 [ 59.811743] flags: 0x200000000008100(slab|head) [ 59.816380] raw: 0200000000008100 ffff8801d12f03c0 0000000000000000 0000000100000001 [ 59.824227] raw: ffffea0007430a20 ffff8801dac01c48 ffff8801dac02200 0000000000000000 [ 59.832072] page dumped because: kasan: bad access detected [ 59.837747] [ 59.839341] Memory state around the buggy address: [ 59.844239] ffff8801d12f3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.851568] ffff8801d12f3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.858894] >ffff8801d12f3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.866219] ^ [ 59.873456] ffff8801d12f3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.880783] ffff8801d12f3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.888106] ================================================================== [ 59.895429] Disabling lock debugging due to kernel taint [ 59.900844] Kernel panic - not syncing: panic_on_warn set ... [ 59.900844] [ 59.908172] CPU: 0 PID: 2981 Comm: syzkaller717241 Tainted: G B 4.14.0-rc5+ #47 [ 59.916710] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 59.926027] Call Trace: [ 59.928583] dump_stack+0x194/0x257 [ 59.932176] ? arch_local_irq_restore+0x53/0x53 [ 59.936813] ? kasan_end_report+0x32/0x50 [ 59.940927] ? lock_downgrade+0x990/0x990 [ 59.945045] ? detach_if_pending+0x510/0x610 [ 59.949422] panic+0x1e4/0x417 [ 59.952579] ? __warn+0x1d9/0x1d9 [ 59.956003] ? detach_if_pending+0x557/0x610 [ 59.960378] kasan_end_report+0x50/0x50 [ 59.964318] kasan_report+0x144/0x340 [ 59.968085] __asan_report_store8_noabort+0x17/0x20 [ 59.973064] detach_if_pending+0x557/0x610 [ 59.977263] ? trace_raw_output_tick_stop+0x130/0x130 [ 59.982419] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 59.987051] ? lock_timer_base+0x1a3/0x2b0 [ 59.991253] ? lock_timer_base+0x1eb/0x2b0 [ 59.995453] ? __internal_add_timer+0x2d0/0x2d0 [ 60.000087] ? lock_downgrade+0x990/0x990 [ 60.004201] ? trace_hardirqs_on+0xd/0x10 [ 60.008319] try_to_del_timer_sync+0xa2/0x120 [ 60.012777] ? del_timer+0x130/0x130 [ 60.016458] ? del_timer_sync+0xeb/0x240 [ 60.020488] del_timer_sync+0x18a/0x240 [ 60.024432] tun_free_netdev+0x105/0x1b0 [ 60.028458] ? tun_xdp+0x410/0x410 [ 60.031963] ? cpumask_next+0x24/0x30 [ 60.035733] ? netdev_refcnt_read+0xed/0x150 [ 60.040107] ? tun_xdp+0x410/0x410 [ 60.043615] netdev_run_todo+0x870/0xca0 [ 60.047640] ? do_group_exit+0x149/0x400 [ 60.051667] ? mark_held_locks+0xaf/0x100 [ 60.055781] ? register_netdev+0x30/0x30 [ 60.059811] ? find_held_lock+0x35/0x1d0 [ 60.063842] ? lock_downgrade+0x990/0x990 [ 60.067963] ? refcount_sub_and_test+0x115/0x1b0 [ 60.072684] ? refcount_inc+0x50/0x50 [ 60.076458] ? refcount_inc+0x50/0x50 [ 60.080226] ? sk_destruct+0x4c/0x80 [ 60.083906] ? __sk_free+0x5c/0x230 [ 60.087497] ? sk_free+0x2f/0x40 [ 60.090827] ? __tun_detach+0x176/0x1390 [ 60.094861] ? tun_attach+0xfa0/0xfa0 [ 60.098628] ? check_noncircular+0x20/0x20 [ 60.102832] ? locks_remove_file+0x3fa/0x5a0 [ 60.107207] ? fcntl_setlk+0x10c0/0x10c0 [ 60.111236] ? kmem_cache_free+0x77/0x280 [ 60.115352] ? __fsnotify_parent+0xb4/0x3a0 [ 60.119663] ? fsnotify+0x1af0/0x1af0 [ 60.123430] ? __tun_detach+0x1390/0x1390 [ 60.127542] ? __tun_detach+0x1390/0x1390 [ 60.131657] rtnl_unlock+0xe/0x10 [ 60.135075] tun_chr_close+0x49/0x60 [ 60.138754] __fput+0x327/0x7e0 [ 60.142004] ? fput+0x140/0x140 [ 60.145251] ? _raw_spin_unlock_irq+0x27/0x70 [ 60.149714] ____fput+0x15/0x20 [ 60.152959] task_work_run+0x199/0x270 [ 60.156812] ? task_work_cancel+0x210/0x210 [ 60.161098] ? _raw_spin_unlock+0x22/0x30 [ 60.165212] ? switch_task_namespaces+0x87/0xc0 [ 60.169847] do_exit+0x9b5/0x1ad0 [ 60.173267] ? __handle_mm_fault+0xf07/0x39c0 [ 60.177728] ? mm_update_next_owner+0x930/0x930 [ 60.182361] ? lock_release+0xa40/0xa40 [ 60.186300] ? do_raw_spin_trylock+0x190/0x190 [ 60.190849] ? preempt_notifier_dec+0x20/0x20 [ 60.195315] ? __handle_mm_fault+0x587/0x39c0 [ 60.199780] ? check_noncircular+0x20/0x20 [ 60.203978] ? __pmd_alloc+0x4e0/0x4e0 [ 60.207834] ? to_ratio+0x30/0x30 [ 60.211257] ? find_held_lock+0x35/0x1d0 [ 60.215287] ? handle_mm_fault+0x248/0x8d0 [ 60.219488] ? find_held_lock+0x35/0x1d0 [ 60.223521] ? __do_page_fault+0x64c/0xd60 [ 60.227723] ? lock_downgrade+0x990/0x990 [ 60.231840] ? handle_mm_fault+0x410/0x8d0 [ 60.236038] ? down_read_trylock+0xdb/0x170 [ 60.240323] ? __do_page_fault+0x31e/0xd60 [ 60.244524] ? __handle_mm_fault+0x39c0/0x39c0 [ 60.249072] ? vmacache_find+0x5f/0x280 [ 60.253010] ? vmacache_update+0xfe/0x130 [ 60.257126] do_group_exit+0x149/0x400 [ 60.260980] ? __do_page_fault+0x3d6/0xd60 [ 60.265183] ? exit_to_usermode_loop+0x198/0x310 [ 60.269904] ? SyS_exit+0x30/0x30 [ 60.273325] ? do_fast_syscall_32+0x158/0xf05 [ 60.277784] ? do_group_exit+0x400/0x400 [ 60.281809] SyS_exit_group+0x1d/0x20 [ 60.285573] do_fast_syscall_32+0x3f2/0xf05 [ 60.289862] ? do_int80_syscall_32+0x940/0x940 [ 60.294410] ? kasan_check_read+0x11/0x20 [ 60.298523] ? do_syscall_64+0x8d0/0x8d0 [ 60.302551] ? SyS_rt_sigaction+0x94/0x1b0 [ 60.306751] ? SyS_sigprocmask+0x4b0/0x4b0 [ 60.310951] ? SyS_read+0x184/0x220