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-mmots-kasan-gce-4,10.128.15.233' (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: [ 34.255476] ================================================================== [ 34.262906] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 34.269633] Write of size 8 at addr ffff8801ce69b780 by task syzkaller339268/2987 [ 34.277224] [ 34.278835] CPU: 0 PID: 2987 Comm: syzkaller339268 Not tainted 4.14.0-rc2-mm1+ #8 [ 34.286424] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.295761] Call Trace: [ 34.298321] dump_stack+0x194/0x257 [ 34.301922] ? arch_local_irq_restore+0x53/0x53 [ 34.306560] ? show_regs_print_info+0x65/0x65 [ 34.311027] ? lock_timer_base+0x1a3/0x2b0 [ 34.315234] ? detach_if_pending+0x557/0x610 [ 34.319614] print_address_description+0x73/0x250 [ 34.324427] ? detach_if_pending+0x557/0x610 [ 34.328803] kasan_report+0x25b/0x340 [ 34.332580] __asan_report_store8_noabort+0x17/0x20 [ 34.337564] detach_if_pending+0x557/0x610 [ 34.341779] ? trace_raw_output_tick_stop+0x130/0x130 [ 34.346940] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 34.351578] ? lock_timer_base+0x1a3/0x2b0 [ 34.355783] ? lock_timer_base+0x1eb/0x2b0 [ 34.359992] ? __internal_add_timer+0x2d0/0x2d0 [ 34.364634] ? trace_hardirqs_on+0xd/0x10 [ 34.368763] try_to_del_timer_sync+0xa2/0x120 [ 34.373228] ? del_timer+0x130/0x130 [ 34.376914] ? del_timer_sync+0xeb/0x240 [ 34.380950] del_timer_sync+0x18a/0x240 [ 34.384898] tun_free_netdev+0x105/0x1b0 [ 34.388932] ? tun_xdp+0x410/0x410 [ 34.392442] ? cpumask_next+0x24/0x30 [ 34.396220] ? netdev_refcnt_read+0xed/0x150 [ 34.400614] ? tun_xdp+0x410/0x410 [ 34.404129] netdev_run_todo+0x870/0xca0 [ 34.408162] ? do_group_exit+0x149/0x400 [ 34.412199] ? register_netdev+0x30/0x30 [ 34.416236] ? lock_downgrade+0x990/0x990 [ 34.420355] ? trace_hardirqs_on+0xd/0x10 [ 34.424491] ? refcount_sub_and_test+0x115/0x1b0 [ 34.429217] ? refcount_inc+0x50/0x50 [ 34.432987] ? refcount_inc+0x50/0x50 [ 34.436770] ? sk_destruct+0x4c/0x80 [ 34.440453] ? __sk_free+0x5c/0x230 [ 34.444065] ? sk_free+0x2f/0x40 [ 34.447404] ? __tun_detach+0x176/0x1390 [ 34.451446] ? tun_attach+0xf90/0xf90 [ 34.455223] ? do_raw_spin_trylock+0x190/0x190 [ 34.459776] ? locks_remove_file+0x3fa/0x5a0 [ 34.464159] ? fcntl_setlk+0x10d0/0x10d0 [ 34.468195] ? __fsnotify_parent+0xb4/0x3a0 [ 34.472489] ? fsnotify+0x1af0/0x1af0 [ 34.476261] ? rcu_note_context_switch+0x710/0x710 [ 34.481166] ? __tun_detach+0x1390/0x1390 [ 34.485283] rtnl_unlock+0xe/0x10 [ 34.488705] tun_chr_close+0x49/0x60 [ 34.492394] __fput+0x333/0x7f0 [ 34.495652] ? fput+0x140/0x140 [ 34.498906] ? trace_event_raw_event_sched_switch+0x770/0x770 [ 34.504758] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.509229] ____fput+0x15/0x20 [ 34.512478] task_work_run+0x199/0x270 [ 34.516342] ? task_work_cancel+0x210/0x210 [ 34.520637] ? _raw_spin_unlock+0x22/0x30 [ 34.524755] ? switch_task_namespaces+0x87/0xc0 [ 34.529407] do_exit+0x9d2/0x1af0 [ 34.532838] ? mm_update_next_owner+0x930/0x930 [ 34.537476] ? __pmd_alloc+0x4e0/0x4e0 [ 34.541345] ? find_held_lock+0x39/0x1d0 [ 34.545387] ? lock_downgrade+0x990/0x990 [ 34.549525] ? handle_mm_fault+0x410/0x8d0 [ 34.553729] ? down_read_trylock+0xdb/0x170 [ 34.558021] ? __handle_mm_fault+0x39c0/0x39c0 [ 34.562571] ? vmacache_find+0x5f/0x280 [ 34.566522] ? up_read+0x1a/0x40 [ 34.569862] ? __do_page_fault+0x35b/0xb60 [ 34.574065] ? do_vfs_ioctl+0x492/0x1530 [ 34.578103] ? do_page_fault+0xee/0x720 [ 34.582048] ? __do_page_fault+0xb60/0xb60 [ 34.586252] ? putname+0xf3/0x130 [ 34.589687] do_group_exit+0x149/0x400 [ 34.593547] ? lockdep_sys_exit+0x47/0xf0 [ 34.597676] ? SyS_exit+0x30/0x30 [ 34.601101] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.606090] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.610818] SyS_exit_group+0x1d/0x20 [ 34.614587] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.619311] RIP: 0033:0x443bf8 [ 34.622477] RSP: 002b:00007ffc60d45f68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 34.630156] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443bf8 [ 34.637394] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 34.644633] RBP: 0000000000000086 R08: 00000000000000e7 R09: ffffffffffffffd4 [ 34.651872] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 34.659116] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 34.666371] [ 34.667976] Allocated by task 2987: [ 34.671574] save_stack_trace+0x16/0x20 [ 34.675517] save_stack+0x43/0xd0 [ 34.678944] kasan_kmalloc+0xad/0xe0 [ 34.682627] __kmalloc_node+0x47/0x70 [ 34.686395] kvmalloc_node+0x64/0xd0 [ 34.690076] alloc_netdev_mqs+0x16e/0xed0 [ 34.694190] __tun_chr_ioctl+0x12be/0x3d20 [ 34.698392] tun_chr_ioctl+0x2a/0x40 [ 34.702072] do_vfs_ioctl+0x1b1/0x1530 [ 34.705927] SyS_ioctl+0x8f/0xc0 [ 34.709264] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.713983] [ 34.715578] Freed by task 2987: [ 34.718829] save_stack_trace+0x16/0x20 [ 34.722770] save_stack+0x43/0xd0 [ 34.726193] kasan_slab_free+0x71/0xc0 [ 34.730047] kfree+0xca/0x250 [ 34.733123] kvfree+0x36/0x60 [ 34.736195] free_netdev+0x2cf/0x360 [ 34.739877] __tun_chr_ioctl+0x2cf6/0x3d20 [ 34.744078] tun_chr_ioctl+0x2a/0x40 [ 34.747759] do_vfs_ioctl+0x1b1/0x1530 [ 34.751624] SyS_ioctl+0x8f/0xc0 [ 34.754961] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.759682] [ 34.761282] The buggy address belongs to the object at ffff8801ce698380 [ 34.761282] which belongs to the cache kmalloc-16384 of size 16384 [ 34.774251] The buggy address is located 13312 bytes inside of [ 34.774251] 16384-byte region [ffff8801ce698380, ffff8801ce69c380) [ 34.786437] The buggy address belongs to the page: [ 34.791335] page:ffffea000739a600 count:1 mapcount:0 mapping:ffff8801ce698380 index:0x0 compound_mapcount: 0 [ 34.801278] flags: 0x200000000008100(slab|head) [ 34.805916] raw: 0200000000008100 ffff8801ce698380 0000000000000000 0000000100000001 [ 34.813765] raw: ffffea000736fe20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 34.821623] page dumped because: kasan: bad access detected [ 34.827299] [ 34.828895] Memory state around the buggy address: [ 34.833803] ffff8801ce69b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.841138] ffff8801ce69b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.848464] >ffff8801ce69b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.855791] ^ [ 34.859123] ffff8801ce69b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.866457] ffff8801ce69b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.873790] ================================================================== [ 34.881122] Disabling lock debugging due to kernel taint [ 34.886535] Kernel panic - not syncing: panic_on_warn set ... [ 34.886535] [ 34.893860] CPU: 0 PID: 2987 Comm: syzkaller339268 Tainted: G B 4.14.0-rc2-mm1+ #8 [ 34.902655] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.911973] Call Trace: [ 34.914527] dump_stack+0x194/0x257 [ 34.918122] ? arch_local_irq_restore+0x53/0x53 [ 34.922758] ? vprintk_default+0x28/0x30 [ 34.926791] ? detach_if_pending+0x510/0x610 [ 34.931165] panic+0x1e4/0x417 [ 34.934321] ? __warn+0x1d9/0x1d9 [ 34.937745] ? detach_if_pending+0x557/0x610 [ 34.942119] kasan_end_report+0x50/0x50 [ 34.946057] kasan_report+0x144/0x340 [ 34.949824] __asan_report_store8_noabort+0x17/0x20 [ 34.954802] detach_if_pending+0x557/0x610 [ 34.959000] ? trace_raw_output_tick_stop+0x130/0x130 [ 34.964153] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 34.968783] ? lock_timer_base+0x1a3/0x2b0 [ 34.972989] ? lock_timer_base+0x1eb/0x2b0 [ 34.977190] ? __internal_add_timer+0x2d0/0x2d0 [ 34.981823] ? trace_hardirqs_on+0xd/0x10 [ 34.985948] try_to_del_timer_sync+0xa2/0x120 [ 34.990929] ? del_timer+0x130/0x130 [ 34.994608] ? del_timer_sync+0xeb/0x240 [ 34.998638] del_timer_sync+0x18a/0x240 [ 35.002579] tun_free_netdev+0x105/0x1b0 [ 35.006604] ? tun_xdp+0x410/0x410 [ 35.010110] ? cpumask_next+0x24/0x30 [ 35.013898] ? netdev_refcnt_read+0xed/0x150 [ 35.018271] ? tun_xdp+0x410/0x410 [ 35.021779] netdev_run_todo+0x870/0xca0 [ 35.025806] ? do_group_exit+0x149/0x400 [ 35.029834] ? register_netdev+0x30/0x30 [ 35.033862] ? lock_downgrade+0x990/0x990 [ 35.037974] ? trace_hardirqs_on+0xd/0x10 [ 35.042095] ? refcount_sub_and_test+0x115/0x1b0 [ 35.046815] ? refcount_inc+0x50/0x50 [ 35.050578] ? refcount_inc+0x50/0x50 [ 35.054345] ? sk_destruct+0x4c/0x80 [ 35.058022] ? __sk_free+0x5c/0x230 [ 35.061611] ? sk_free+0x2f/0x40 [ 35.065027] ? __tun_detach+0x176/0x1390 [ 35.069058] ? tun_attach+0xf90/0xf90 [ 35.072826] ? do_raw_spin_trylock+0x190/0x190 [ 35.077373] ? locks_remove_file+0x3fa/0x5a0 [ 35.081748] ? fcntl_setlk+0x10d0/0x10d0 [ 35.085778] ? __fsnotify_parent+0xb4/0x3a0 [ 35.090065] ? fsnotify+0x1af0/0x1af0 [ 35.093834] ? rcu_note_context_switch+0x710/0x710 [ 35.098986] ? __tun_detach+0x1390/0x1390 [ 35.103098] rtnl_unlock+0xe/0x10 [ 35.106515] tun_chr_close+0x49/0x60 [ 35.110194] __fput+0x333/0x7f0 [ 35.113439] ? fput+0x140/0x140 [ 35.116687] ? trace_event_raw_event_sched_switch+0x770/0x770 [ 35.122537] ? _raw_spin_unlock_irq+0x27/0x70 [ 35.126997] ____fput+0x15/0x20 [ 35.130242] task_work_run+0x199/0x270 [ 35.134094] ? task_work_cancel+0x210/0x210 [ 35.138380] ? _raw_spin_unlock+0x22/0x30 [ 35.142490] ? switch_task_namespaces+0x87/0xc0 [ 35.147130] do_exit+0x9d2/0x1af0 [ 35.150559] ? mm_update_next_owner+0x930/0x930 [ 35.155192] ? __pmd_alloc+0x4e0/0x4e0 [ 35.159052] ? find_held_lock+0x39/0x1d0 [ 35.163082] ? lock_downgrade+0x990/0x990 [ 35.167204] ? handle_mm_fault+0x410/0x8d0 [ 35.171402] ? down_read_trylock+0xdb/0x170 [ 35.175696] ? __handle_mm_fault+0x39c0/0x39c0 [ 35.180241] ? vmacache_find+0x5f/0x280 [ 35.184187] ? up_read+0x1a/0x40 [ 35.187538] ? __do_page_fault+0x35b/0xb60 [ 35.191744] ? do_vfs_ioctl+0x492/0x1530 [ 35.195771] ? do_page_fault+0xee/0x720 [ 35.199715] ? __do_page_fault+0xb60/0xb60 [ 35.203912] ? putname+0xf3/0x130 [ 35.207330] do_group_exit+0x149/0x400 [ 35.211184] ? lockdep_sys_exit+0x47/0xf0 [ 35.215296] ? SyS_exit+0x30/0x30 [ 35.218712] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.223693] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.228412] SyS_exit_group+0x1d/0x20 [ 35.232178] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.236896] RIP: 0033:0x443bf8 [ 35.240050] RSP: 002b:00007ffc60d45f68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 35.247719] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443bf8