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-5,10.128.15.232' (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: [ 24.065427] ================================================================== [ 24.066583] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 24.067496] Write of size 8 at addr ffff8801ce14b740 by task syzkaller059266/2978 [ 24.068569] [ 24.068825] CPU: 0 PID: 2978 Comm: syzkaller059266 Not tainted 4.14.0-rc2-mm1+ #10 [ 24.069907] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.071171] Call Trace: [ 24.071562] dump_stack+0x194/0x257 [ 24.072081] ? arch_local_irq_restore+0x53/0x53 [ 24.072748] ? show_regs_print_info+0x65/0x65 [ 24.073375] ? lock_timer_base+0x1a3/0x2b0 [ 24.073969] ? detach_if_pending+0x557/0x610 [ 24.074604] print_address_description+0x73/0x250 [ 24.075273] ? detach_if_pending+0x557/0x610 [ 24.075926] kasan_report+0x25b/0x340 [ 24.076469] __asan_report_store8_noabort+0x17/0x20 [ 24.077161] detach_if_pending+0x557/0x610 [ 24.077757] ? trace_raw_output_tick_stop+0x130/0x130 [ 24.078477] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 24.079139] ? lock_timer_base+0x1a3/0x2b0 [ 24.079764] ? lock_timer_base+0x1eb/0x2b0 [ 24.080363] ? __internal_add_timer+0x2d0/0x2d0 [ 24.081032] ? trace_hardirqs_on+0xd/0x10 [ 24.081643] try_to_del_timer_sync+0xa2/0x120 [ 24.082287] ? del_timer+0x130/0x130 [ 24.082831] ? del_timer_sync+0xeb/0x240 [ 24.083431] del_timer_sync+0x18a/0x240 [ 24.084030] tun_free_netdev+0x105/0x1b0 [ 24.084619] ? tun_xdp+0x410/0x410 [ 24.085120] ? cpumask_next+0x24/0x30 [ 24.085712] ? netdev_refcnt_read+0xed/0x150 [ 24.090120] ? tun_xdp+0x410/0x410 [ 24.093657] netdev_run_todo+0x870/0xca0 [ 24.097714] ? do_group_exit+0x149/0x400 [ 24.101778] ? register_netdev+0x30/0x30 [ 24.105836] ? lock_downgrade+0x990/0x990 [ 24.109977] ? trace_hardirqs_on+0xd/0x10 [ 24.114153] ? refcount_sub_and_test+0x115/0x1b0 [ 24.118901] ? refcount_inc+0x50/0x50 [ 24.122698] ? refcount_inc+0x50/0x50 [ 24.126504] ? sk_destruct+0x4c/0x80 [ 24.130215] ? __sk_free+0x5c/0x230 [ 24.133843] ? sk_free+0x2f/0x40 [ 24.137206] ? __tun_detach+0x760/0x1570 [ 24.141279] ? tun_attach+0x1070/0x1070 [ 24.145239] ? do_raw_spin_trylock+0x190/0x190 [ 24.149807] ? locks_remove_file+0x3fa/0x5a0 [ 24.154202] ? fcntl_setlk+0x10d0/0x10d0 [ 24.158243] ? __fsnotify_parent+0xb4/0x3a0 [ 24.162548] ? fsnotify+0x1af0/0x1af0 [ 24.166327] ? rcu_note_context_switch+0x710/0x710 [ 24.171238] ? __tun_detach+0x1570/0x1570 [ 24.175364] rtnl_unlock+0xe/0x10 [ 24.178791] tun_chr_close+0x49/0x60 [ 24.182482] __fput+0x333/0x7f0 [ 24.185748] ? fput+0x140/0x140 [ 24.189005] ? trace_event_raw_event_sched_switch+0x770/0x770 [ 24.194868] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.199350] ____fput+0x15/0x20 [ 24.202607] task_work_run+0x199/0x270 [ 24.206476] ? task_work_cancel+0x210/0x210 [ 24.210774] ? _raw_spin_unlock+0x22/0x30 [ 24.214897] ? switch_task_namespaces+0x87/0xc0 [ 24.219551] do_exit+0x9c8/0x1b00 [ 24.222990] ? mm_update_next_owner+0x930/0x930 [ 24.227636] ? find_held_lock+0x39/0x1d0 [ 24.231689] ? lock_downgrade+0x990/0x990 [ 24.235847] ? handle_mm_fault+0x410/0x8d0 [ 24.240060] ? __do_page_fault+0x31e/0xd60 [ 24.244271] ? __handle_mm_fault+0x39c0/0x39c0 [ 24.248828] ? vmacache_find+0x5f/0x280 [ 24.252788] ? up_read+0x1a/0x40 [ 24.256130] ? __do_page_fault+0x3d6/0xd60 [ 24.260353] ? mm_fault_error+0x2c0/0x2c0 [ 24.264476] ? do_vfs_ioctl+0x492/0x1530 [ 24.268511] ? _cond_resched+0x14/0x30 [ 24.272387] ? do_page_fault+0xee/0x720 [ 24.276338] ? __do_page_fault+0xd60/0xd60 [ 24.280551] ? putname+0xf3/0x130 [ 24.283988] do_group_exit+0x149/0x400 [ 24.287850] ? lockdep_sys_exit+0x47/0xf0 [ 24.291975] ? SyS_exit+0x30/0x30 [ 24.295405] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.300397] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.305133] SyS_exit_group+0x1d/0x20 [ 24.308911] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.313641] RIP: 0033:0x4436b8 [ 24.316804] RSP: 002b:00007ffe4f90e428 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.324490] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004436b8 [ 24.331735] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.338978] RBP: 0000000000000086 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.346223] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 24.353467] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 24.360737] [ 24.362340] Allocated by task 2978: [ 24.365942] save_stack_trace+0x16/0x20 [ 24.369890] save_stack+0x43/0xd0 [ 24.373318] kasan_kmalloc+0xad/0xe0 [ 24.377006] __kmalloc_node+0x47/0x70 [ 24.380782] kvmalloc_node+0x64/0xd0 [ 24.384469] alloc_netdev_mqs+0x16d/0xed0 [ 24.388592] __tun_chr_ioctl+0x1386/0x3e40 [ 24.392800] tun_chr_ioctl+0x2a/0x40 [ 24.396487] do_vfs_ioctl+0x1b1/0x1530 [ 24.400347] SyS_ioctl+0x8f/0xc0 [ 24.403690] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.408416] [ 24.410017] Freed by task 2978: [ 24.413272] save_stack_trace+0x16/0x20 [ 24.417227] save_stack+0x43/0xd0 [ 24.420653] kasan_slab_free+0x71/0xc0 [ 24.424516] kfree+0xca/0x250 [ 24.427594] kvfree+0x36/0x60 [ 24.430672] free_netdev+0x2cf/0x360 [ 24.434358] __tun_chr_ioctl+0x2df6/0x3e40 [ 24.438567] tun_chr_ioctl+0x2a/0x40 [ 24.442255] do_vfs_ioctl+0x1b1/0x1530 [ 24.446115] SyS_ioctl+0x8f/0xc0 [ 24.449457] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.454182] [ 24.455786] The buggy address belongs to the object at ffff8801ce148340 [ 24.455786] which belongs to the cache kmalloc-16384 of size 16384 [ 24.468763] The buggy address is located 13312 bytes inside of [ 24.468763] 16384-byte region [ffff8801ce148340, ffff8801ce14c340) [ 24.480957] The buggy address belongs to the page: [ 24.485861] page:ffffea0007385200 count:1 mapcount:0 mapping:ffff8801ce148340 index:0x0 compound_mapcount: 0 [ 24.495812] flags: 0x200000000008100(slab|head) [ 24.500457] raw: 0200000000008100 ffff8801ce148340 0000000000000000 0000000100000001 [ 24.508312] raw: ffffea0007343e20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 24.516162] page dumped because: kasan: bad access detected [ 24.521841] [ 24.523440] Memory state around the buggy address: [ 24.528344] ffff8801ce14b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.535677] ffff8801ce14b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.543011] >ffff8801ce14b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.550340] ^ [ 24.555760] ffff8801ce14b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.563094] ffff8801ce14b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.570423] ================================================================== [ 24.577753] Disabling lock debugging due to kernel taint [ 24.583168] Kernel panic - not syncing: panic_on_warn set ... [ 24.583168] [ 24.590514] CPU: 0 PID: 2978 Comm: syzkaller059266 Tainted: G B 4.14.0-rc2-mm1+ #10 [ 24.599406] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.608728] Call Trace: [ 24.611290] dump_stack+0x194/0x257 [ 24.614886] ? arch_local_irq_restore+0x53/0x53 [ 24.619526] ? vprintk_default+0x28/0x30 [ 24.623559] ? detach_if_pending+0x4d0/0x610 [ 24.627940] panic+0x1e4/0x417 [ 24.631100] ? __warn+0x1d9/0x1d9 [ 24.634532] ? detach_if_pending+0x557/0x610 [ 24.638912] kasan_end_report+0x50/0x50 [ 24.642852] kasan_report+0x144/0x340 [ 24.646624] __asan_report_store8_noabort+0x17/0x20 [ 24.651606] detach_if_pending+0x557/0x610 [ 24.655811] ? trace_raw_output_tick_stop+0x130/0x130 [ 24.660970] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 24.665604] ? lock_timer_base+0x1a3/0x2b0 [ 24.669807] ? lock_timer_base+0x1eb/0x2b0 [ 24.674015] ? __internal_add_timer+0x2d0/0x2d0 [ 24.678654] ? trace_hardirqs_on+0xd/0x10 [ 24.682774] try_to_del_timer_sync+0xa2/0x120 [ 24.687237] ? del_timer+0x130/0x130 [ 24.690921] ? del_timer_sync+0xeb/0x240 [ 24.694953] del_timer_sync+0x18a/0x240 [ 24.698899] tun_free_netdev+0x105/0x1b0 [ 24.702927] ? tun_xdp+0x410/0x410 [ 24.706435] ? cpumask_next+0x24/0x30 [ 24.710205] ? netdev_refcnt_read+0xed/0x150 [ 24.714585] ? tun_xdp+0x410/0x410 [ 24.718095] netdev_run_todo+0x870/0xca0 [ 24.722126] ? do_group_exit+0x149/0x400 [ 24.726159] ? register_netdev+0x30/0x30 [ 24.730191] ? lock_downgrade+0x990/0x990 [ 24.734306] ? trace_hardirqs_on+0xd/0x10 [ 24.738442] ? refcount_sub_and_test+0x115/0x1b0 [ 24.743166] ? refcount_inc+0x50/0x50 [ 24.746936] ? refcount_inc+0x50/0x50 [ 24.750712] ? sk_destruct+0x4c/0x80 [ 24.754394] ? __sk_free+0x5c/0x230 [ 24.758531] ? sk_free+0x2f/0x40 [ 24.761867] ? __tun_detach+0x760/0x1570 [ 24.765904] ? tun_attach+0x1070/0x1070 [ 24.769850] ? do_raw_spin_trylock+0x190/0x190 [ 24.774405] ? locks_remove_file+0x3fa/0x5a0 [ 24.778784] ? fcntl_setlk+0x10d0/0x10d0 [ 24.782814] ? __fsnotify_parent+0xb4/0x3a0 [ 24.787107] ? fsnotify+0x1af0/0x1af0 [ 24.790880] ? rcu_note_context_switch+0x710/0x710 [ 24.795781] ? __tun_detach+0x1570/0x1570 [ 24.799898] rtnl_unlock+0xe/0x10 [ 24.803320] tun_chr_close+0x49/0x60 [ 24.807610] __fput+0x333/0x7f0 [ 24.810860] ? fput+0x140/0x140 [ 24.814114] ? trace_event_raw_event_sched_switch+0x770/0x770 [ 24.819969] ? _raw_spin_unlock_irq+0x27/0x70 [ 24.824438] ____fput+0x15/0x20 [ 24.827687] task_work_run+0x199/0x270 [ 24.831545] ? task_work_cancel+0x210/0x210 [ 24.835834] ? _raw_spin_unlock+0x22/0x30 [ 24.839950] ? switch_task_namespaces+0x87/0xc0 [ 24.844590] do_exit+0x9c8/0x1b00 [ 24.848016] ? mm_update_next_owner+0x930/0x930 [ 24.852655] ? find_held_lock+0x39/0x1d0 [ 24.856690] ? lock_downgrade+0x990/0x990 [ 24.860825] ? handle_mm_fault+0x410/0x8d0 [ 24.865029] ? __do_page_fault+0x31e/0xd60 [ 24.869237] ? __handle_mm_fault+0x39c0/0x39c0 [ 24.873788] ? vmacache_find+0x5f/0x280 [ 24.877735] ? up_read+0x1a/0x40 [ 24.881069] ? __do_page_fault+0x3d6/0xd60 [ 24.885276] ? mm_fault_error+0x2c0/0x2c0 [ 24.889393] ? do_vfs_ioctl+0x492/0x1530 [ 24.893420] ? _cond_resched+0x14/0x30 [ 24.897281] ? do_page_fault+0xee/0x720 [ 24.901225] ? __do_page_fault+0xd60/0xd60 [ 24.905428] ? putname+0xf3/0x130 [ 24.908854] do_group_exit+0x149/0x400 [ 24.912709] ? lockdep_sys_exit+0x47/0xf0 [ 24.916824] ? SyS_exit+0x30/0x30 [ 24.920245] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.925232] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.929959] SyS_exit_group+0x1d/0x20 [ 24.933730] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.938453] RIP: 0033:0x4436b8 [ 24.941611] RSP: 002b:00007ffe4f90e428 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 24.949287] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004436b8 [ 24.956524] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 24.963761] RBP: 0000000000000086 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 24.970997] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 24.978234] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000