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-3,10.128.15.198' (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: [ 73.619233] ================================================================== [ 73.626649] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 73.633370] Write of size 8 at addr ffff8801ce393740 by task syzkaller233554/2983 [ 73.641420] [ 73.643023] CPU: 0 PID: 2983 Comm: syzkaller233554 Not tainted 4.14.0-rc4-mm1+ #16 [ 73.650696] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 73.660020] Call Trace: [ 73.662578] dump_stack+0x194/0x257 [ 73.666178] ? arch_local_irq_restore+0x53/0x53 [ 73.670822] ? show_regs_print_info+0x65/0x65 [ 73.675289] ? lock_timer_base+0x1a3/0x2b0 [ 73.679500] ? detach_if_pending+0x557/0x610 [ 73.683883] print_address_description+0x73/0x250 [ 73.688694] ? detach_if_pending+0x557/0x610 [ 73.693072] kasan_report+0x25b/0x340 [ 73.696863] __asan_report_store8_noabort+0x17/0x20 [ 73.701849] detach_if_pending+0x557/0x610 [ 73.706057] ? trace_raw_output_tick_stop+0x130/0x130 [ 73.711220] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 73.715856] ? lock_timer_base+0x1a3/0x2b0 [ 73.720063] ? lock_timer_base+0x1eb/0x2b0 [ 73.724277] ? __internal_add_timer+0x2d0/0x2d0 [ 73.728921] ? trace_hardirqs_on+0xd/0x10 [ 73.733049] try_to_del_timer_sync+0xa2/0x120 [ 73.737519] ? del_timer+0x130/0x130 [ 73.741207] ? del_timer_sync+0xeb/0x240 [ 73.745246] del_timer_sync+0x18a/0x240 [ 73.749196] tun_free_netdev+0x105/0x1b0 [ 73.753228] ? tun_xdp+0x410/0x410 [ 73.756737] ? cpumask_next+0x24/0x30 [ 73.760512] ? netdev_refcnt_read+0xed/0x150 [ 73.764899] netdev_run_todo+0x683/0xae0 [ 73.768935] ? tun_xdp+0x410/0x410 [ 73.772443] ? register_netdev+0x30/0x30 [ 73.776473] ? refcount_inc+0x50/0x50 [ 73.780242] ? refcount_inc+0x50/0x50 [ 73.784021] ? sk_destruct+0x4c/0x80 [ 73.787705] ? __sk_free+0x5c/0x230 [ 73.791306] ? sk_free+0x2f/0x40 [ 73.794643] ? __tun_detach+0x760/0x1570 [ 73.798701] ? locks_remove_file+0x3fa/0x5a0 [ 73.803084] ? fcntl_setlk+0x10d0/0x10d0 [ 73.807123] ? fsnotify+0x1af0/0x1af0 [ 73.810900] ? __tun_detach+0x1570/0x1570 [ 73.815021] rtnl_unlock+0xe/0x10 [ 73.818442] tun_chr_close+0x49/0x60 [ 73.822125] __fput+0x333/0x7f0 [ 73.825397] ? fput+0x140/0x140 [ 73.828649] ? check_same_owner+0x320/0x320 [ 73.832949] ____fput+0x15/0x20 [ 73.836199] task_work_run+0x199/0x270 [ 73.840059] ? task_work_cancel+0x210/0x210 [ 73.844351] ? free_nsproxy+0x185/0x1f0 [ 73.848298] ? switch_task_namespaces+0xa2/0xc0 [ 73.852945] do_exit+0x9c8/0x1b00 [ 73.856372] ? kvfree+0x3b/0x60 [ 73.859626] ? mm_update_next_owner+0x930/0x930 [ 73.864262] ? rtnl_unlock+0xe/0x10 [ 73.867858] ? __tun_chr_ioctl+0x27a/0x3e40 [ 73.872159] ? tun_chr_read_iter+0x1e0/0x1e0 [ 73.876538] ? lock_downgrade+0x990/0x990 [ 73.880683] ? handle_mm_fault+0x410/0x8d0 [ 73.884888] ? __do_page_fault+0x31e/0xd60 [ 73.889104] ? check_same_owner+0x320/0x320 [ 73.893394] ? up_read+0x1a/0x40 [ 73.896737] ? __do_page_fault+0x3d6/0xd60 [ 73.900947] ? tun_chr_compat_ioctl+0x30/0x30 [ 73.905413] ? tun_chr_ioctl+0x2a/0x40 [ 73.909278] ? tun_chr_ioctl+0x2a/0x40 [ 73.913137] ? do_vfs_ioctl+0x492/0x1530 [ 73.917263] ? ioctl_preallocate+0x2b0/0x2b0 [ 73.921647] ? selinux_capable+0x40/0x40 [ 73.925685] ? putname+0xf3/0x130 [ 73.929116] do_group_exit+0x149/0x400 [ 73.932976] ? SyS_exit+0x30/0x30 [ 73.936401] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 73.941389] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 73.946118] SyS_exit_group+0x1d/0x20 [ 73.949891] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 73.954615] RIP: 0033:0x445249 [ 73.957774] RSP: 002b:00007fff0c2f3798 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 73.965456] RAX: ffffffffffffffda RBX: 00007fff0c2f37d0 RCX: 0000000000445249 [ 73.972694] RDX: 0000000000445249 RSI: 0000000020927fd8 RDI: 0000000000000001 [ 73.979935] RBP: 0000000000000082 R08: 0000000000000000 R09: 00007fff0c2f37d0 [ 73.987174] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004025f0 [ 73.994412] R13: 0000000000402680 R14: 0000000000000000 R15: 0000000000000000 [ 74.001667] [ 74.003263] Allocated by task 2983: [ 74.006861] save_stack+0x43/0xd0 [ 74.010280] kasan_kmalloc+0xad/0xe0 [ 74.013959] __kmalloc_node+0x47/0x70 [ 74.017728] kvmalloc_node+0x64/0xd0 [ 74.021409] alloc_netdev_mqs+0x16d/0xed0 [ 74.025524] __tun_chr_ioctl+0x1386/0x3e40 [ 74.029727] tun_chr_ioctl+0x2a/0x40 [ 74.033409] do_vfs_ioctl+0x1b1/0x1530 [ 74.037265] SyS_ioctl+0x8f/0xc0 [ 74.040598] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 74.045319] [ 74.046917] Freed by task 2983: [ 74.050165] save_stack+0x43/0xd0 [ 74.053586] kasan_slab_free+0x71/0xc0 [ 74.057444] kfree+0xca/0x250 [ 74.060520] kvfree+0x36/0x60 [ 74.063613] free_netdev+0x2cf/0x360 [ 74.067299] __tun_chr_ioctl+0x2df6/0x3e40 [ 74.071505] tun_chr_ioctl+0x2a/0x40 [ 74.075187] do_vfs_ioctl+0x1b1/0x1530 [ 74.079046] SyS_ioctl+0x8f/0xc0 [ 74.082384] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 74.087104] [ 74.088704] The buggy address belongs to the object at ffff8801ce390340 [ 74.088704] which belongs to the cache kmalloc-16384 of size 16384 [ 74.101677] The buggy address is located 13312 bytes inside of [ 74.101677] 16384-byte region [ffff8801ce390340, ffff8801ce394340) [ 74.113869] The buggy address belongs to the page: [ 74.118771] page:ffffea000738e400 count:1 mapcount:0 mapping:ffff8801ce390340 index:0x0 compound_mapcount: 0 [ 74.128721] flags: 0x200000000008100(slab|head) [ 74.133362] raw: 0200000000008100 ffff8801ce390340 0000000000000000 0000000100000001 [ 74.141212] raw: ffffea0007362620 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 74.149061] page dumped because: kasan: bad access detected [ 74.154741] [ 74.156338] Memory state around the buggy address: [ 74.161236] ffff8801ce393600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 74.168565] ffff8801ce393680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 74.175892] >ffff8801ce393700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 74.183220] ^ [ 74.188641] ffff8801ce393780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 74.195972] ffff8801ce393800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 74.203300] ================================================================== [ 74.210628] Disabling lock debugging due to kernel taint [ 74.216041] Kernel panic - not syncing: panic_on_warn set ... [ 74.216041] [ 74.223367] CPU: 0 PID: 2983 Comm: syzkaller233554 Tainted: G B 4.14.0-rc4-mm1+ #16 [ 74.232338] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 74.241658] Call Trace: [ 74.244209] dump_stack+0x194/0x257 [ 74.247801] ? arch_local_irq_restore+0x53/0x53 [ 74.252434] ? vprintk_default+0x28/0x30 [ 74.256466] ? detach_if_pending+0x540/0x610 [ 74.260844] panic+0x1e4/0x41c [ 74.264001] ? refcount_error_report+0x214/0x214 [ 74.268727] ? detach_if_pending+0x557/0x610 [ 74.273099] kasan_end_report+0x50/0x50 [ 74.277038] kasan_report+0x144/0x340 [ 74.280805] __asan_report_store8_noabort+0x17/0x20 [ 74.285786] detach_if_pending+0x557/0x610 [ 74.289988] ? trace_raw_output_tick_stop+0x130/0x130 [ 74.295143] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 74.299777] ? lock_timer_base+0x1a3/0x2b0 [ 74.303980] ? lock_timer_base+0x1eb/0x2b0 [ 74.308180] ? __internal_add_timer+0x2d0/0x2d0 [ 74.312815] ? trace_hardirqs_on+0xd/0x10 [ 74.316930] try_to_del_timer_sync+0xa2/0x120 [ 74.321390] ? del_timer+0x130/0x130 [ 74.325071] ? del_timer_sync+0xeb/0x240 [ 74.329101] del_timer_sync+0x18a/0x240 [ 74.333041] tun_free_netdev+0x105/0x1b0 [ 74.337067] ? tun_xdp+0x410/0x410 [ 74.340570] ? cpumask_next+0x24/0x30 [ 74.344337] ? netdev_refcnt_read+0xed/0x150 [ 74.348712] netdev_run_todo+0x683/0xae0 [ 74.352740] ? tun_xdp+0x410/0x410 [ 74.356245] ? register_netdev+0x30/0x30 [ 74.360273] ? refcount_inc+0x50/0x50 [ 74.364037] ? refcount_inc+0x50/0x50 [ 74.367803] ? sk_destruct+0x4c/0x80 [ 74.371480] ? __sk_free+0x5c/0x230 [ 74.375070] ? sk_free+0x2f/0x40 [ 74.378404] ? __tun_detach+0x760/0x1570 [ 74.382441] ? locks_remove_file+0x3fa/0x5a0 [ 74.386816] ? fcntl_setlk+0x10d0/0x10d0 [ 74.390847] ? fsnotify+0x1af0/0x1af0 [ 74.394616] ? __tun_detach+0x1570/0x1570 [ 74.398729] rtnl_unlock+0xe/0x10 [ 74.402146] tun_chr_close+0x49/0x60 [ 74.405827] __fput+0x333/0x7f0 [ 74.409074] ? fput+0x140/0x140 [ 74.412320] ? check_same_owner+0x320/0x320 [ 74.416609] ____fput+0x15/0x20 [ 74.419856] task_work_run+0x199/0x270 [ 74.423708] ? task_work_cancel+0x210/0x210 [ 74.427994] ? free_nsproxy+0x185/0x1f0 [ 74.431933] ? switch_task_namespaces+0xa2/0xc0 [ 74.436569] do_exit+0x9c8/0x1b00 [ 74.439988] ? kvfree+0x3b/0x60 [ 74.443233] ? mm_update_next_owner+0x930/0x930 [ 74.447865] ? rtnl_unlock+0xe/0x10 [ 74.451456] ? __tun_chr_ioctl+0x27a/0x3e40 [ 74.455749] ? tun_chr_read_iter+0x1e0/0x1e0 [ 74.460121] ? lock_downgrade+0x990/0x990 [ 74.464246] ? handle_mm_fault+0x410/0x8d0 [ 74.468446] ? __do_page_fault+0x31e/0xd60 [ 74.472651] ? check_same_owner+0x320/0x320 [ 74.476937] ? up_read+0x1a/0x40 [ 74.480267] ? __do_page_fault+0x3d6/0xd60 [ 74.484467] ? tun_chr_compat_ioctl+0x30/0x30 [ 74.488925] ? tun_chr_ioctl+0x2a/0x40 [ 74.492779] ? tun_chr_ioctl+0x2a/0x40 [ 74.496631] ? do_vfs_ioctl+0x492/0x1530 [ 74.500658] ? ioctl_preallocate+0x2b0/0x2b0 [ 74.505034] ? selinux_capable+0x40/0x40 [ 74.509060] ? putname+0xf3/0x130 [ 74.512480] do_group_exit+0x149/0x400 [ 74.516333] ? SyS_exit+0x30/0x30 [ 74.519751] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 74.524733] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 74.529453] SyS_exit_group+0x1d/0x20 [ 74.533220] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 74.537940] RIP: 0033:0x445249 [ 74.541094] RSP: 002b:00007fff0c2f3798 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 74.548768] RAX: ffffffffffffffda RBX: 00007fff0c2f37d0 RCX: 0000000000445249 [ 74.556005] RDX: 0000000000445249 RSI: 0000000020927fd8 RDI: 0000000000000001 [ 74.563242] RBP: 0000000000000082 R08: 0000000000000000 R09: 00007fff0c2f37d0 [ 74.570486] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004025f0 [ 74.577724] R13: 0000000000402680 R14: 0000000000000000 R15: 0000000000000000 [ 74.585002] Dumping ftrace buffer: [ 74.588511] (ftrace buffer empty) [ 74.592192] Kernel Offset: disabled [ 74.595785] Rebooting in 86400 seconds..