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-1,10.128.15.194' (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.969344] ================================================================== [ 32.970480] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 32.971401] Write of size 8 at addr ffff8801d1ed36f8 by task syzkaller800229/2988 [ 32.972400] [ 32.972633] CPU: 1 PID: 2988 Comm: syzkaller800229 Not tainted 4.14.0-rc5+ #52 [ 32.973599] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.974833] Call Trace: [ 32.975199] dump_stack+0x194/0x257 [ 32.975695] ? arch_local_irq_restore+0x53/0x53 [ 32.976319] ? show_regs_print_info+0x65/0x65 [ 32.976943] ? lock_acquire+0x1d5/0x580 [ 32.977478] ? lock_timer_base+0x1a3/0x2b0 [ 32.978046] ? detach_if_pending+0x557/0x610 [ 32.978638] print_address_description+0x73/0x250 [ 32.979295] ? detach_if_pending+0x557/0x610 [ 32.979885] kasan_report+0x25b/0x340 [ 32.980400] __asan_report_store8_noabort+0x17/0x20 [ 32.981070] detach_if_pending+0x557/0x610 [ 32.981640] ? trace_raw_output_tick_stop+0x130/0x130 [ 32.982348] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 32.982969] ? lock_timer_base+0x1a3/0x2b0 [ 32.983551] ? lock_timer_base+0x1eb/0x2b0 [ 32.984134] ? __internal_add_timer+0x2d0/0x2d0 [ 32.984773] ? lock_downgrade+0x990/0x990 [ 32.985347] ? trace_hardirqs_on+0xd/0x10 [ 32.985921] try_to_del_timer_sync+0xa2/0x120 [ 32.986522] ? del_timer+0x130/0x130 [ 32.987022] ? del_timer_sync+0xeb/0x240 [ 32.987643] del_timer_sync+0x18a/0x240 [ 32.988199] tun_free_netdev+0x105/0x1b0 [ 32.988746] ? tun_xdp+0x410/0x410 [ 32.989235] ? cpumask_next+0x24/0x30 [ 32.989760] ? netdev_refcnt_read+0xed/0x150 [ 32.994141] ? tun_xdp+0x410/0x410 [ 32.997649] netdev_run_todo+0x870/0xca0 [ 33.001681] ? do_group_exit+0x149/0x400 [ 33.005714] ? mark_held_locks+0xaf/0x100 [ 33.009832] ? register_netdev+0x30/0x30 [ 33.013863] ? find_held_lock+0x35/0x1d0 [ 33.017904] ? lock_downgrade+0x990/0x990 [ 33.022026] ? refcount_sub_and_test+0x115/0x1b0 [ 33.026749] ? refcount_inc+0x50/0x50 [ 33.030520] ? refcount_inc+0x50/0x50 [ 33.034292] ? sk_destruct+0x4c/0x80 [ 33.037973] ? __sk_free+0x5c/0x230 [ 33.041569] ? sk_free+0x2f/0x40 [ 33.044925] ? __tun_detach+0x176/0x1390 [ 33.048994] ? tun_attach+0xfa0/0xfa0 [ 33.052786] ? check_noncircular+0x20/0x20 [ 33.057021] ? locks_remove_file+0x3fa/0x5a0 [ 33.061416] ? fcntl_setlk+0x10c0/0x10c0 [ 33.065454] ? kmem_cache_free+0x77/0x280 [ 33.069582] ? __fsnotify_parent+0xb4/0x3a0 [ 33.073896] ? fsnotify+0x1af0/0x1af0 [ 33.077684] ? __tun_detach+0x1390/0x1390 [ 33.081813] ? __tun_detach+0x1390/0x1390 [ 33.085932] rtnl_unlock+0xe/0x10 [ 33.089351] tun_chr_close+0x49/0x60 [ 33.093038] __fput+0x327/0x7e0 [ 33.096298] ? fput+0x140/0x140 [ 33.099555] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.104035] ____fput+0x15/0x20 [ 33.107291] task_work_run+0x199/0x270 [ 33.111153] ? task_work_cancel+0x210/0x210 [ 33.115446] ? _raw_spin_unlock+0x22/0x30 [ 33.119565] ? switch_task_namespaces+0x87/0xc0 [ 33.124215] do_exit+0x9b5/0x1ad0 [ 33.127645] ? __handle_mm_fault+0xf07/0x39c0 [ 33.132117] ? mm_update_next_owner+0x930/0x930 [ 33.136754] ? lock_release+0xa40/0xa40 [ 33.140696] ? do_raw_spin_trylock+0x190/0x190 [ 33.145263] ? preempt_notifier_dec+0x20/0x20 [ 33.149753] ? __handle_mm_fault+0x587/0x39c0 [ 33.154226] ? check_noncircular+0x20/0x20 [ 33.158427] ? __pmd_alloc+0x4e0/0x4e0 [ 33.162294] ? to_ratio+0x30/0x30 [ 33.165730] ? find_held_lock+0x35/0x1d0 [ 33.169773] ? handle_mm_fault+0x248/0x8d0 [ 33.173985] ? find_held_lock+0x35/0x1d0 [ 33.178027] ? __do_page_fault+0x64c/0xd60 [ 33.182231] ? lock_downgrade+0x990/0x990 [ 33.186356] ? handle_mm_fault+0x410/0x8d0 [ 33.190558] ? down_read_trylock+0xdb/0x170 [ 33.194852] ? __do_page_fault+0x31e/0xd60 [ 33.199065] ? __handle_mm_fault+0x39c0/0x39c0 [ 33.203627] ? vmacache_find+0x5f/0x280 [ 33.207581] ? vmacache_update+0xfe/0x130 [ 33.211723] do_group_exit+0x149/0x400 [ 33.215597] ? __do_page_fault+0x3d6/0xd60 [ 33.219814] ? exit_to_usermode_loop+0x198/0x310 [ 33.224558] ? SyS_exit+0x30/0x30 [ 33.228005] ? do_fast_syscall_32+0x158/0xf05 [ 33.232479] ? do_group_exit+0x400/0x400 [ 33.236521] SyS_exit_group+0x1d/0x20 [ 33.240306] do_fast_syscall_32+0x3f2/0xf05 [ 33.244621] ? do_int80_syscall_32+0x940/0x940 [ 33.249196] ? kasan_check_read+0x11/0x20 [ 33.253318] ? do_syscall_64+0x8d0/0x8d0 [ 33.257362] ? SyS_rt_sigaction+0x94/0x1b0 [ 33.261581] ? SyS_sigprocmask+0x4b0/0x4b0 [ 33.265793] ? SyS_read+0x184/0x220 [ 33.269399] ? retint_user+0x18/0x20 [ 33.273087] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 33.277903] entry_SYSENTER_compat+0x51/0x60 [ 33.282278] RIP: 0023:0xf7ff7c79 [ 33.285610] RSP: 002b:00000000ffb1b9ac EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 33.293294] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000008210318 [ 33.300534] RDX: 0000000000000000 RSI: 00000000080dbe58 RDI: 0000000008210320 [ 33.307773] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 33.315010] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 33.322248] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 33.329505] [ 33.331100] Allocated by task 3012: [ 33.334699] save_stack_trace+0x16/0x20 [ 33.338640] save_stack+0x43/0xd0 [ 33.342062] kasan_kmalloc+0xad/0xe0 [ 33.345742] __kmalloc_node+0x47/0x70 [ 33.349511] kvmalloc_node+0x64/0xd0 [ 33.353192] alloc_netdev_mqs+0x16e/0xed0 [ 33.357304] __tun_chr_ioctl+0x12b2/0x3d20 [ 33.361505] tun_chr_compat_ioctl+0x29/0x30 [ 33.365793] compat_SyS_ioctl+0x1d7/0x3290 [ 33.369994] do_fast_syscall_32+0x3f2/0xf05 [ 33.374294] entry_SYSENTER_compat+0x51/0x60 [ 33.378676] [ 33.380290] Freed by task 3012: [ 33.383554] save_stack_trace+0x16/0x20 [ 33.387509] save_stack+0x43/0xd0 [ 33.390931] kasan_slab_free+0x71/0xc0 [ 33.394784] kfree+0xca/0x250 [ 33.397857] kvfree+0x36/0x60 [ 33.400931] free_netdev+0x2cf/0x360 [ 33.404621] __tun_chr_ioctl+0x2cea/0x3d20 [ 33.408834] tun_chr_compat_ioctl+0x29/0x30 [ 33.413136] compat_SyS_ioctl+0x1d7/0x3290 [ 33.417612] do_fast_syscall_32+0x3f2/0xf05 [ 33.421920] entry_SYSENTER_compat+0x51/0x60 [ 33.426301] [ 33.427899] The buggy address belongs to the object at ffff8801d1ed03c0 [ 33.427899] which belongs to the cache kmalloc-16384 of size 16384 [ 33.440886] The buggy address is located 13112 bytes inside of [ 33.440886] 16384-byte region [ffff8801d1ed03c0, ffff8801d1ed43c0) [ 33.453093] The buggy address belongs to the page: [ 33.457999] page:ffffea000747b400 count:1 mapcount:0 mapping:ffff8801d1ed03c0 index:0x0 compound_mapcount: 0 [ 33.467935] flags: 0x200000000008100(slab|head) [ 33.472573] raw: 0200000000008100 ffff8801d1ed03c0 0000000000000000 0000000100000001 [ 33.480420] raw: ffffea00074a8a20 ffff8801dac01c48 ffff8801dac02200 0000000000000000 [ 33.488264] page dumped because: kasan: bad access detected [ 33.493941] [ 33.495534] Memory state around the buggy address: [ 33.500431] ffff8801d1ed3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.507774] ffff8801d1ed3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.515104] >ffff8801d1ed3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.522447] ^ [ 33.529712] ffff8801d1ed3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.537068] ffff8801d1ed3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.544404] ================================================================== [ 33.551748] Disabling lock debugging due to kernel taint [ 33.557177] Kernel panic - not syncing: panic_on_warn set ... [ 33.557177] [ 33.564520] CPU: 1 PID: 2988 Comm: syzkaller800229 Tainted: G B 4.14.0-rc5+ #52 [ 33.573067] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.582497] Call Trace: [ 33.585059] dump_stack+0x194/0x257 [ 33.588653] ? arch_local_irq_restore+0x53/0x53 [ 33.593290] ? kasan_end_report+0x32/0x50 [ 33.597404] ? lock_downgrade+0x990/0x990 [ 33.601517] ? detach_if_pending+0x540/0x610 [ 33.605891] panic+0x1e4/0x417 [ 33.609050] ? __warn+0x1d9/0x1d9 [ 33.612475] ? detach_if_pending+0x557/0x610 [ 33.616847] kasan_end_report+0x50/0x50 [ 33.620784] kasan_report+0x144/0x340 [ 33.624551] __asan_report_store8_noabort+0x17/0x20 [ 33.629533] detach_if_pending+0x557/0x610 [ 33.633735] ? trace_raw_output_tick_stop+0x130/0x130 [ 33.638892] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 33.643533] ? lock_timer_base+0x1a3/0x2b0 [ 33.647731] ? lock_timer_base+0x1eb/0x2b0 [ 33.651933] ? __internal_add_timer+0x2d0/0x2d0 [ 33.656567] ? lock_downgrade+0x990/0x990 [ 33.660678] ? trace_hardirqs_on+0xd/0x10 [ 33.664794] try_to_del_timer_sync+0xa2/0x120 [ 33.669254] ? del_timer+0x130/0x130 [ 33.672934] ? del_timer_sync+0xeb/0x240 [ 33.676962] del_timer_sync+0x18a/0x240 [ 33.680910] tun_free_netdev+0x105/0x1b0 [ 33.684937] ? tun_xdp+0x410/0x410 [ 33.688439] ? cpumask_next+0x24/0x30 [ 33.692206] ? netdev_refcnt_read+0xed/0x150 [ 33.696581] ? tun_xdp+0x410/0x410 [ 33.700085] netdev_run_todo+0x870/0xca0 [ 33.704111] ? do_group_exit+0x149/0x400 [ 33.708138] ? mark_held_locks+0xaf/0x100 [ 33.712250] ? register_netdev+0x30/0x30 [ 33.716276] ? find_held_lock+0x35/0x1d0 [ 33.720306] ? lock_downgrade+0x990/0x990 [ 33.724421] ? refcount_sub_and_test+0x115/0x1b0 [ 33.729140] ? refcount_inc+0x50/0x50 [ 33.732905] ? refcount_inc+0x50/0x50 [ 33.736672] ? sk_destruct+0x4c/0x80 [ 33.740350] ? __sk_free+0x5c/0x230 [ 33.745159] ? sk_free+0x2f/0x40 [ 33.748492] ? __tun_detach+0x176/0x1390 [ 33.752523] ? tun_attach+0xfa0/0xfa0 [ 33.756292] ? check_noncircular+0x20/0x20 [ 33.760495] ? locks_remove_file+0x3fa/0x5a0 [ 33.764878] ? fcntl_setlk+0x10c0/0x10c0 [ 33.768919] ? kmem_cache_free+0x77/0x280 [ 33.773035] ? __fsnotify_parent+0xb4/0x3a0 [ 33.777322] ? fsnotify+0x1af0/0x1af0 [ 33.781106] ? __tun_detach+0x1390/0x1390 [ 33.785232] ? __tun_detach+0x1390/0x1390 [ 33.789347] rtnl_unlock+0xe/0x10 [ 33.792765] tun_chr_close+0x49/0x60 [ 33.796444] __fput+0x327/0x7e0 [ 33.799692] ? fput+0x140/0x140 [ 33.802943] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.807408] ____fput+0x15/0x20 [ 33.810652] task_work_run+0x199/0x270 [ 33.814523] ? task_work_cancel+0x210/0x210 [ 33.818833] ? _raw_spin_unlock+0x22/0x30 [ 33.822953] ? switch_task_namespaces+0x87/0xc0 [ 33.827588] do_exit+0x9b5/0x1ad0 [ 33.831027] ? __handle_mm_fault+0xf07/0x39c0 [ 33.835511] ? mm_update_next_owner+0x930/0x930 [ 33.840167] ? lock_release+0xa40/0xa40 [ 33.844108] ? do_raw_spin_trylock+0x190/0x190 [ 33.848660] ? preempt_notifier_dec+0x20/0x20 [ 33.853140] ? __handle_mm_fault+0x587/0x39c0 [ 33.857626] ? check_noncircular+0x20/0x20 [ 33.861841] ? __pmd_alloc+0x4e0/0x4e0 [ 33.865699] ? to_ratio+0x30/0x30 [ 33.869123] ? find_held_lock+0x35/0x1d0 [ 33.873175] ? handle_mm_fault+0x248/0x8d0 [ 33.877398] ? find_held_lock+0x35/0x1d0 [ 33.881476] ? __do_page_fault+0x64c/0xd60 [ 33.885693] ? lock_downgrade+0x990/0x990 [ 33.889814] ? handle_mm_fault+0x410/0x8d0 [ 33.894012] ? down_read_trylock+0xdb/0x170 [ 33.898297] ? __do_page_fault+0x31e/0xd60 [ 33.902495] ? __handle_mm_fault+0x39c0/0x39c0 [ 33.907041] ? vmacache_find+0x5f/0x280 [ 33.910991] ? vmacache_update+0xfe/0x130 [ 33.915111] do_group_exit+0x149/0x400 [ 33.918965] ? __do_page_fault+0x3d6/0xd60 [ 33.923164] ? exit_to_usermode_loop+0x198/0x310 [ 33.927883] ? SyS_exit+0x30/0x30 [ 33.931303] ? do_fast_syscall_32+0x158/0xf05 [ 33.935764] ? do_group_exit+0x400/0x400 [ 33.939789] SyS_exit_group+0x1d/0x20 [ 33.943553] do_fast_syscall_32+0x3f2/0xf05 [ 33.947843] ? do_int80_syscall_32+0x940/0x940 [ 33.952390] ? kasan_check_read+0x11/0x20 [ 33.956503] ? do_syscall_64+0x8d0/0x8d0 [ 33.960540] ? SyS_rt_sigaction+0x94/0x1b0 [ 33.964755] ? SyS_sigprocmask+0x4b0/0x4b0 [ 33.968957] ? SyS_read+0x184/0x220