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.231' (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: [ 33.860454] ================================================================== [ 33.861623] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 33.862558] Write of size 8 at addr ffff8801cd6e3740 by task syzkaller190476/2983 [ 33.863560] [ 33.863799] CPU: 0 PID: 2983 Comm: syzkaller190476 Not tainted 4.14.0-rc2+ #19 [ 33.864791] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.866036] Call Trace: [ 33.866402] dump_stack+0x194/0x257 [ 33.866921] ? arch_local_irq_restore+0x53/0x53 [ 33.867550] ? show_regs_print_info+0x65/0x65 [ 33.868157] ? lock_timer_base+0x1a3/0x2b0 [ 33.868731] ? detach_if_pending+0x557/0x610 [ 33.869350] print_address_description+0x73/0x250 [ 33.870001] ? detach_if_pending+0x557/0x610 [ 33.870596] kasan_report+0x25b/0x340 [ 33.871117] __asan_report_store8_noabort+0x17/0x20 [ 33.871788] detach_if_pending+0x557/0x610 [ 33.872363] ? trace_raw_output_tick_stop+0x130/0x130 [ 33.873061] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 33.873687] ? lock_timer_base+0x1a3/0x2b0 [ 33.874259] ? lock_timer_base+0x1eb/0x2b0 [ 33.874837] ? __internal_add_timer+0x2d0/0x2d0 [ 33.875520] ? trace_hardirqs_on+0xd/0x10 [ 33.876090] try_to_del_timer_sync+0xa2/0x120 [ 33.876697] ? del_timer+0x130/0x130 [ 33.877206] ? del_timer_sync+0xeb/0x240 [ 33.877763] del_timer_sync+0x18a/0x240 [ 33.878324] tun_free_netdev+0x105/0x1b0 [ 33.878877] ? tun_xdp+0x410/0x410 [ 33.879359] ? cpumask_next+0x24/0x30 [ 33.879878] ? netdev_refcnt_read+0xed/0x150 [ 33.880478] ? tun_xdp+0x410/0x410 [ 33.880962] netdev_run_todo+0x870/0xca0 [ 33.884998] ? do_group_exit+0x149/0x400 [ 33.889043] ? register_netdev+0x30/0x30 [ 33.893082] ? lock_downgrade+0x990/0x990 [ 33.897206] ? trace_hardirqs_on+0xd/0x10 [ 33.901346] ? refcount_sub_and_test+0x115/0x1b0 [ 33.906076] ? refcount_inc+0x50/0x50 [ 33.909851] ? refcount_inc+0x50/0x50 [ 33.913632] ? sk_destruct+0x4c/0x80 [ 33.917320] ? __sk_free+0x5c/0x230 [ 33.920920] ? sk_free+0x2f/0x40 [ 33.924258] ? __tun_detach+0x176/0x1390 [ 33.928301] ? tun_attach+0xf90/0xf90 [ 33.932079] ? do_raw_spin_trylock+0x190/0x190 [ 33.936636] ? locks_remove_file+0x3fa/0x5a0 [ 33.941016] ? fcntl_setlk+0x10d0/0x10d0 [ 33.945054] ? __fsnotify_parent+0xb4/0x3a0 [ 33.949350] ? fsnotify+0x1af0/0x1af0 [ 33.953124] ? __tun_detach+0x1390/0x1390 [ 33.957242] ? __tun_detach+0x1390/0x1390 [ 33.961363] rtnl_unlock+0xe/0x10 [ 33.964786] tun_chr_close+0x49/0x60 [ 33.968470] __fput+0x333/0x7f0 [ 33.971729] ? fput+0x140/0x140 [ 33.974981] ? check_same_owner+0x320/0x320 [ 33.979271] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.983746] ____fput+0x15/0x20 [ 33.986996] task_work_run+0x199/0x270 [ 33.990859] ? task_work_cancel+0x210/0x210 [ 33.995152] ? _raw_spin_unlock+0x22/0x30 [ 33.999271] ? switch_task_namespaces+0x87/0xc0 [ 34.003918] do_exit+0x9d2/0x1af0 [ 34.007349] ? mm_update_next_owner+0x930/0x930 [ 34.011990] ? lock_acquire+0x1d5/0x580 [ 34.015934] ? __handle_mm_fault+0xf07/0x39c0 [ 34.020406] ? lock_release+0xd70/0xd70 [ 34.024352] ? check_noncircular+0x20/0x20 [ 34.028560] ? kvfree+0x3b/0x60 [ 34.031820] ? rtnl_unlock+0xe/0x10 [ 34.035420] ? check_noncircular+0x20/0x20 [ 34.039629] ? __handle_mm_fault+0x587/0x39c0 [ 34.044102] ? __pmd_alloc+0x4e0/0x4e0 [ 34.047973] ? find_held_lock+0x39/0x1d0 [ 34.052016] ? lock_downgrade+0x990/0x990 [ 34.056167] do_group_exit+0x149/0x400 [ 34.060026] ? __handle_mm_fault+0x39c0/0x39c0 [ 34.064578] ? vmacache_find+0x5f/0x280 [ 34.068523] ? SyS_exit+0x30/0x30 [ 34.071952] ? do_fast_syscall_32+0x158/0xf05 [ 34.076417] ? do_group_exit+0x400/0x400 [ 34.080447] SyS_exit_group+0x1d/0x20 [ 34.084218] do_fast_syscall_32+0x3f2/0xf05 [ 34.088517] ? do_int80_syscall_32+0x940/0x940 [ 34.093072] ? kasan_check_read+0x11/0x20 [ 34.097192] ? syscall_return_slowpath+0x510/0x510 [ 34.102092] ? SyS_rt_sigaction+0x94/0x1b0 [ 34.106299] ? lockdep_sys_exit+0x47/0xf0 [ 34.110419] ? retint_user+0x18/0x20 [ 34.114108] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.118928] entry_SYSENTER_compat+0x51/0x60 [ 34.123307] RIP: 0023:0xf7fb5c79 [ 34.126640] RSP: 002b:00000000ff8b85ec EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 34.134320] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f1298 [ 34.141568] RDX: 0000000000000000 RSI: 00000000080dacd8 RDI: 00000000080f12a0 [ 34.148815] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 34.156057] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 34.163299] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 34.170565] [ 34.172164] Allocated by task 2983: [ 34.175768] save_stack_trace+0x16/0x20 [ 34.179713] save_stack+0x43/0xd0 [ 34.183138] kasan_kmalloc+0xad/0xe0 [ 34.186821] __kmalloc_node+0x47/0x70 [ 34.190591] kvmalloc_node+0x64/0xd0 [ 34.194274] alloc_netdev_mqs+0x16e/0xed0 [ 34.198391] __tun_chr_ioctl+0x12be/0x3d20 [ 34.202593] tun_chr_compat_ioctl+0x29/0x30 [ 34.206884] compat_SyS_ioctl+0x1d7/0x3290 [ 34.211089] do_fast_syscall_32+0x3f2/0xf05 [ 34.215380] entry_SYSENTER_compat+0x51/0x60 [ 34.219753] [ 34.221350] Freed by task 2983: [ 34.224600] save_stack_trace+0x16/0x20 [ 34.228546] save_stack+0x43/0xd0 [ 34.231968] kasan_slab_free+0x71/0xc0 [ 34.235825] kfree+0xca/0x250 [ 34.238900] kvfree+0x36/0x60 [ 34.241975] free_netdev+0x2cf/0x360 [ 34.245657] __tun_chr_ioctl+0x2cf6/0x3d20 [ 34.249861] tun_chr_compat_ioctl+0x29/0x30 [ 34.254156] compat_SyS_ioctl+0x1d7/0x3290 [ 34.258361] do_fast_syscall_32+0x3f2/0xf05 [ 34.262651] entry_SYSENTER_compat+0x51/0x60 [ 34.267035] [ 34.268633] The buggy address belongs to the object at ffff8801cd6e0340 [ 34.268633] which belongs to the cache kmalloc-16384 of size 16384 [ 34.281606] The buggy address is located 13312 bytes inside of [ 34.281606] 16384-byte region [ffff8801cd6e0340, ffff8801cd6e4340) [ 34.293800] The buggy address belongs to the page: [ 34.298700] page:ffffea000735b800 count:1 mapcount:0 mapping:ffff8801cd6e0340 index:0x0 compound_mapcount: 0 [ 34.308644] flags: 0x200000000008100(slab|head) [ 34.313283] raw: 0200000000008100 ffff8801cd6e0340 0000000000000000 0000000100000001 [ 34.321132] raw: ffffea0007352020 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 34.328979] page dumped because: kasan: bad access detected [ 34.334658] [ 34.336255] Memory state around the buggy address: [ 34.341152] ffff8801cd6e3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.348480] ffff8801cd6e3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.355810] >ffff8801cd6e3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.363136] ^ [ 34.368556] ffff8801cd6e3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.375883] ffff8801cd6e3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.383211] ================================================================== [ 34.390537] Disabling lock debugging due to kernel taint [ 34.395950] Kernel panic - not syncing: panic_on_warn set ... [ 34.395950] [ 34.403275] CPU: 0 PID: 2983 Comm: syzkaller190476 Tainted: G B 4.14.0-rc2+ #19 [ 34.411815] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.421133] Call Trace: [ 34.423687] dump_stack+0x194/0x257 [ 34.427281] ? arch_local_irq_restore+0x53/0x53 [ 34.431915] ? vprintk_default+0x28/0x30 [ 34.435944] ? detach_if_pending+0x4d0/0x610 [ 34.440317] panic+0x1e4/0x417 [ 34.443475] ? __warn+0x1d9/0x1d9 [ 34.446900] ? detach_if_pending+0x557/0x610 [ 34.451271] kasan_end_report+0x50/0x50 [ 34.455209] kasan_report+0x144/0x340 [ 34.458976] __asan_report_store8_noabort+0x17/0x20 [ 34.463957] detach_if_pending+0x557/0x610 [ 34.468156] ? trace_raw_output_tick_stop+0x130/0x130 [ 34.473308] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 34.477939] ? lock_timer_base+0x1a3/0x2b0 [ 34.482136] ? lock_timer_base+0x1eb/0x2b0 [ 34.486334] ? __internal_add_timer+0x2d0/0x2d0 [ 34.490968] ? trace_hardirqs_on+0xd/0x10 [ 34.495084] try_to_del_timer_sync+0xa2/0x120 [ 34.499541] ? del_timer+0x130/0x130 [ 34.503219] ? del_timer_sync+0xeb/0x240 [ 34.507245] del_timer_sync+0x18a/0x240 [ 34.511185] tun_free_netdev+0x105/0x1b0 [ 34.515210] ? tun_xdp+0x410/0x410 [ 34.518713] ? cpumask_next+0x24/0x30 [ 34.522481] ? netdev_refcnt_read+0xed/0x150 [ 34.526856] ? tun_xdp+0x410/0x410 [ 34.530360] netdev_run_todo+0x870/0xca0 [ 34.534384] ? do_group_exit+0x149/0x400 [ 34.538411] ? register_netdev+0x30/0x30 [ 34.542438] ? lock_downgrade+0x990/0x990 [ 34.546553] ? trace_hardirqs_on+0xd/0x10 [ 34.550676] ? refcount_sub_and_test+0x115/0x1b0 [ 34.555397] ? refcount_inc+0x50/0x50 [ 34.559161] ? refcount_inc+0x50/0x50 [ 34.562935] ? sk_destruct+0x4c/0x80 [ 34.566612] ? __sk_free+0x5c/0x230 [ 34.570204] ? sk_free+0x2f/0x40 [ 34.573535] ? __tun_detach+0x176/0x1390 [ 34.577564] ? tun_attach+0xf90/0xf90 [ 34.581330] ? do_raw_spin_trylock+0x190/0x190 [ 34.585879] ? locks_remove_file+0x3fa/0x5a0 [ 34.590253] ? fcntl_setlk+0x10d0/0x10d0 [ 34.594280] ? __fsnotify_parent+0xb4/0x3a0 [ 34.598567] ? fsnotify+0x1af0/0x1af0 [ 34.602333] ? __tun_detach+0x1390/0x1390 [ 34.606445] ? __tun_detach+0x1390/0x1390 [ 34.610557] rtnl_unlock+0xe/0x10 [ 34.613980] tun_chr_close+0x49/0x60 [ 34.617659] __fput+0x333/0x7f0 [ 34.620906] ? fput+0x140/0x140 [ 34.624151] ? check_same_owner+0x320/0x320 [ 34.628434] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.632896] ____fput+0x15/0x20 [ 34.636139] task_work_run+0x199/0x270 [ 34.639991] ? task_work_cancel+0x210/0x210 [ 34.644275] ? _raw_spin_unlock+0x22/0x30 [ 34.648385] ? switch_task_namespaces+0x87/0xc0 [ 34.653020] do_exit+0x9d2/0x1af0 [ 34.656442] ? mm_update_next_owner+0x930/0x930 [ 34.661073] ? lock_acquire+0x1d5/0x580 [ 34.665010] ? __handle_mm_fault+0xf07/0x39c0 [ 34.669481] ? lock_release+0xd70/0xd70 [ 34.673421] ? check_noncircular+0x20/0x20 [ 34.677622] ? kvfree+0x3b/0x60 [ 34.680870] ? rtnl_unlock+0xe/0x10 [ 34.684463] ? check_noncircular+0x20/0x20 [ 34.688663] ? __handle_mm_fault+0x587/0x39c0 [ 34.693557] ? __pmd_alloc+0x4e0/0x4e0 [ 34.697418] ? find_held_lock+0x39/0x1d0 [ 34.701449] ? lock_downgrade+0x990/0x990 [ 34.705572] do_group_exit+0x149/0x400 [ 34.709422] ? __handle_mm_fault+0x39c0/0x39c0 [ 34.713969] ? vmacache_find+0x5f/0x280 [ 34.717909] ? SyS_exit+0x30/0x30 [ 34.721329] ? do_fast_syscall_32+0x158/0xf05 [ 34.725808] ? do_group_exit+0x400/0x400 [ 34.729835] SyS_exit_group+0x1d/0x20 [ 34.733600] do_fast_syscall_32+0x3f2/0xf05 [ 34.737890] ? do_int80_syscall_32+0x940/0x940 [ 34.742439] ? kasan_check_read+0x11/0x20 [ 34.746552] ? syscall_return_slowpath+0x510/0x510 [ 34.751446] ? SyS_rt_sigaction+0x94/0x1b0 [ 34.755648] ? lockdep_sys_exit+0x47/0xf0 [ 34.759761] ? retint_user+0x18/0x20 [ 34.763443] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 34.768253] entry_SYSENTER_compat+0x51/0x60 [ 34.772625] RIP: 0023:0xf7fb5c79 [ 34.775954] RSP: 002b:00000000ff8b85ec EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 34.783629] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f1298 [ 34.790864] RDX: 0000000000000000 RSI: 00000000080dacd8 RDI: 00000000080f12a0 [ 34.798097] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 34.805329] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 34.812562] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000