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-9,10.128.15.201' (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: [ 50.992277] ================================================================== [ 50.999721] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 51.006443] Write of size 8 at addr ffff8801ce14b740 by task syzkaller260354/2985 [ 51.014030] [ 51.015633] CPU: 0 PID: 2985 Comm: syzkaller260354 Not tainted 4.14.0-rc4+ #131 [ 51.023049] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.032373] Call Trace: [ 51.034935] dump_stack+0x194/0x257 [ 51.038537] ? arch_local_irq_restore+0x53/0x53 [ 51.043180] ? show_regs_print_info+0x65/0x65 [ 51.047650] ? lock_timer_base+0x1a3/0x2b0 [ 51.051859] ? detach_if_pending+0x557/0x610 [ 51.056239] print_address_description+0x73/0x250 [ 51.061055] ? detach_if_pending+0x557/0x610 [ 51.065438] kasan_report+0x25b/0x340 [ 51.069214] __asan_report_store8_noabort+0x17/0x20 [ 51.074198] detach_if_pending+0x557/0x610 [ 51.078405] ? trace_raw_output_tick_stop+0x130/0x130 [ 51.083572] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 51.088210] ? lock_timer_base+0x1a3/0x2b0 [ 51.092415] ? lock_timer_base+0x1eb/0x2b0 [ 51.096626] ? __internal_add_timer+0x2d0/0x2d0 [ 51.101265] ? trace_hardirqs_on+0xd/0x10 [ 51.105389] try_to_del_timer_sync+0xa2/0x120 [ 51.109853] ? del_timer+0x130/0x130 [ 51.113538] ? del_timer_sync+0xeb/0x240 [ 51.117575] del_timer_sync+0x18a/0x240 [ 51.121525] tun_free_netdev+0x105/0x1b0 [ 51.125559] ? tun_xdp+0x410/0x410 [ 51.129071] ? cpumask_next+0x24/0x30 [ 51.132847] ? netdev_refcnt_read+0xed/0x150 [ 51.137228] ? tun_xdp+0x410/0x410 [ 51.140740] netdev_run_todo+0x870/0xca0 [ 51.144773] ? do_group_exit+0x149/0x400 [ 51.148809] ? register_netdev+0x30/0x30 [ 51.152847] ? lock_downgrade+0x990/0x990 [ 51.157661] ? trace_hardirqs_on+0xd/0x10 [ 51.161796] ? refcount_sub_and_test+0x115/0x1b0 [ 51.166523] ? refcount_inc+0x50/0x50 [ 51.170293] ? refcount_inc+0x50/0x50 [ 51.174071] ? sk_destruct+0x4c/0x80 [ 51.177754] ? __sk_free+0x5c/0x230 [ 51.181354] ? sk_free+0x2f/0x40 [ 51.184691] ? __tun_detach+0x176/0x1390 [ 51.188733] ? tun_attach+0xf90/0xf90 [ 51.192516] ? locks_remove_file+0x3fa/0x5a0 [ 51.196896] ? fcntl_setlk+0x10d0/0x10d0 [ 51.200931] ? __fsnotify_parent+0xb4/0x3a0 [ 51.205224] ? fsnotify+0x1af0/0x1af0 [ 51.209000] ? __tun_detach+0x1390/0x1390 [ 51.213120] rtnl_unlock+0xe/0x10 [ 51.216543] tun_chr_close+0x49/0x60 [ 51.220226] __fput+0x333/0x7f0 [ 51.223482] ? fput+0x140/0x140 [ 51.226738] ? check_same_owner+0x320/0x320 [ 51.231035] ____fput+0x15/0x20 [ 51.234287] task_work_run+0x199/0x270 [ 51.238147] ? task_work_cancel+0x210/0x210 [ 51.242437] ? free_nsproxy+0x185/0x1f0 [ 51.246382] ? switch_task_namespaces+0xa2/0xc0 [ 51.251035] do_exit+0x9d2/0x1af0 [ 51.254471] ? mm_update_next_owner+0x930/0x930 [ 51.259114] ? find_held_lock+0x39/0x1d0 [ 51.263156] ? lock_downgrade+0x990/0x990 [ 51.267299] ? handle_mm_fault+0x410/0x8d0 [ 51.271506] ? __do_page_fault+0x31e/0xd60 [ 51.275709] ? __handle_mm_fault+0x39c0/0x39c0 [ 51.280262] ? vmacache_find+0x5f/0x280 [ 51.284214] ? up_read+0x1a/0x40 [ 51.287550] ? __do_page_fault+0x3d6/0xd60 [ 51.291764] ? mm_fault_error+0x2c0/0x2c0 [ 51.295884] ? do_vfs_ioctl+0x492/0x1530 [ 51.299925] ? do_page_fault+0xee/0x720 [ 51.303872] ? __do_page_fault+0xd60/0xd60 [ 51.308078] ? putname+0xf3/0x130 [ 51.311507] do_group_exit+0x149/0x400 [ 51.315375] ? lockdep_sys_exit+0x47/0xf0 [ 51.319497] ? SyS_exit+0x30/0x30 [ 51.322922] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.327912] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 51.332649] SyS_exit_group+0x1d/0x20 [ 51.336422] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.341146] RIP: 0033:0x444e99 [ 51.344303] RSP: 002b:00007ffe726d6778 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 51.351983] RAX: ffffffffffffffda RBX: 00007ffe726d67c0 RCX: 0000000000444e99 [ 51.359225] RDX: 0000000000444e99 RSI: 00000000207cdff1 RDI: 0000000000000001 [ 51.366464] RBP: 0000000000000086 R08: 0000000000000000 R09: 00007ffe726d67c0 [ 51.373703] R10: 0000000000000000 R11: 0000000000000202 R12: 00000000004021e0 [ 51.380942] R13: 0000000000402270 R14: 0000000000000000 R15: 0000000000000000 [ 51.388201] [ 51.389800] Allocated by task 2985: [ 51.393400] save_stack_trace+0x16/0x20 [ 51.397380] save_stack+0x43/0xd0 [ 51.400805] kasan_kmalloc+0xad/0xe0 [ 51.404485] __kmalloc_node+0x47/0x70 [ 51.408257] kvmalloc_node+0x64/0xd0 [ 51.411957] alloc_netdev_mqs+0x16e/0xed0 [ 51.416078] __tun_chr_ioctl+0x12be/0x3d20 [ 51.420281] tun_chr_ioctl+0x2a/0x40 [ 51.423963] do_vfs_ioctl+0x1b1/0x1530 [ 51.427819] SyS_ioctl+0x8f/0xc0 [ 51.431156] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.435878] [ 51.437475] Freed by task 2985: [ 51.440725] save_stack_trace+0x16/0x20 [ 51.444668] save_stack+0x43/0xd0 [ 51.448089] kasan_slab_free+0x71/0xc0 [ 51.451944] kfree+0xca/0x250 [ 51.455020] kvfree+0x36/0x60 [ 51.458098] free_netdev+0x2cf/0x360 [ 51.461782] __tun_chr_ioctl+0x2cf6/0x3d20 [ 51.465986] tun_chr_ioctl+0x2a/0x40 [ 51.469669] do_vfs_ioctl+0x1b1/0x1530 [ 51.473522] SyS_ioctl+0x8f/0xc0 [ 51.476860] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.481581] [ 51.483180] The buggy address belongs to the object at ffff8801ce148340 [ 51.483180] which belongs to the cache kmalloc-16384 of size 16384 [ 51.496151] The buggy address is located 13312 bytes inside of [ 51.496151] 16384-byte region [ffff8801ce148340, ffff8801ce14c340) [ 51.508337] The buggy address belongs to the page: [ 51.513235] page:ffffea0007385200 count:1 mapcount:0 mapping:ffff8801ce148340 index:0x0 compound_mapcount: 0 [ 51.523180] flags: 0x200000000008100(slab|head) [ 51.527818] raw: 0200000000008100 ffff8801ce148340 0000000000000000 0000000100000001 [ 51.535668] raw: ffffea0007332e20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 51.543514] page dumped because: kasan: bad access detected [ 51.549189] [ 51.550785] Memory state around the buggy address: [ 51.555683] ffff8801ce14b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.563010] ffff8801ce14b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.570338] >ffff8801ce14b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.577663] ^ [ 51.583078] ffff8801ce14b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.590404] ffff8801ce14b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.597729] ================================================================== [ 51.605055] Disabling lock debugging due to kernel taint [ 51.610468] Kernel panic - not syncing: panic_on_warn set ... [ 51.610468] [ 51.617795] CPU: 0 PID: 2985 Comm: syzkaller260354 Tainted: G B 4.14.0-rc4+ #131 [ 51.626417] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.635733] Call Trace: [ 51.638290] dump_stack+0x194/0x257 [ 51.641884] ? arch_local_irq_restore+0x53/0x53 [ 51.646518] ? vprintk_default+0x28/0x30 [ 51.650545] ? detach_if_pending+0x540/0x610 [ 51.654921] panic+0x1e4/0x417 [ 51.658077] ? __warn+0x1d9/0x1d9 [ 51.661509] ? detach_if_pending+0x557/0x610 [ 51.665881] kasan_end_report+0x50/0x50 [ 51.669818] kasan_report+0x144/0x340 [ 51.673606] __asan_report_store8_noabort+0x17/0x20 [ 51.678587] detach_if_pending+0x557/0x610 [ 51.682786] ? trace_raw_output_tick_stop+0x130/0x130 [ 51.687942] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 51.692571] ? lock_timer_base+0x1a3/0x2b0 [ 51.696770] ? lock_timer_base+0x1eb/0x2b0 [ 51.700969] ? __internal_add_timer+0x2d0/0x2d0 [ 51.705605] ? trace_hardirqs_on+0xd/0x10 [ 51.709719] try_to_del_timer_sync+0xa2/0x120 [ 51.714175] ? del_timer+0x130/0x130 [ 51.717852] ? del_timer_sync+0xeb/0x240 [ 51.721880] del_timer_sync+0x18a/0x240 [ 51.725820] tun_free_netdev+0x105/0x1b0 [ 51.729847] ? tun_xdp+0x410/0x410 [ 51.733351] ? cpumask_next+0x24/0x30 [ 51.737118] ? netdev_refcnt_read+0xed/0x150 [ 51.741491] ? tun_xdp+0x410/0x410 [ 51.744993] netdev_run_todo+0x870/0xca0 [ 51.749016] ? do_group_exit+0x149/0x400 [ 51.753044] ? register_netdev+0x30/0x30 [ 51.757070] ? lock_downgrade+0x990/0x990 [ 51.761180] ? trace_hardirqs_on+0xd/0x10 [ 51.765301] ? refcount_sub_and_test+0x115/0x1b0 [ 51.770021] ? refcount_inc+0x50/0x50 [ 51.773783] ? refcount_inc+0x50/0x50 [ 51.777548] ? sk_destruct+0x4c/0x80 [ 51.781224] ? __sk_free+0x5c/0x230 [ 51.784815] ? sk_free+0x2f/0x40 [ 51.788148] ? __tun_detach+0x176/0x1390 [ 51.792176] ? tun_attach+0xf90/0xf90 [ 51.795944] ? locks_remove_file+0x3fa/0x5a0 [ 51.800317] ? fcntl_setlk+0x10d0/0x10d0 [ 51.804344] ? __fsnotify_parent+0xb4/0x3a0 [ 51.808630] ? fsnotify+0x1af0/0x1af0 [ 51.812398] ? __tun_detach+0x1390/0x1390 [ 51.816508] rtnl_unlock+0xe/0x10 [ 51.819923] tun_chr_close+0x49/0x60 [ 51.823602] __fput+0x333/0x7f0 [ 51.826850] ? fput+0x140/0x140 [ 51.830128] ? check_same_owner+0x320/0x320 [ 51.834414] ____fput+0x15/0x20 [ 51.837657] task_work_run+0x199/0x270 [ 51.841511] ? task_work_cancel+0x210/0x210 [ 51.845796] ? free_nsproxy+0x185/0x1f0 [ 51.849733] ? switch_task_namespaces+0xa2/0xc0 [ 51.854366] do_exit+0x9d2/0x1af0 [ 51.857787] ? mm_update_next_owner+0x930/0x930 [ 51.862422] ? find_held_lock+0x39/0x1d0 [ 51.866450] ? lock_downgrade+0x990/0x990 [ 51.870573] ? handle_mm_fault+0x410/0x8d0 [ 51.874775] ? __do_page_fault+0x31e/0xd60 [ 51.878971] ? __handle_mm_fault+0x39c0/0x39c0 [ 51.883522] ? vmacache_find+0x5f/0x280 [ 51.887463] ? up_read+0x1a/0x40 [ 51.890790] ? __do_page_fault+0x3d6/0xd60 [ 51.894991] ? mm_fault_error+0x2c0/0x2c0 [ 51.899103] ? do_vfs_ioctl+0x492/0x1530 [ 51.903133] ? do_page_fault+0xee/0x720 [ 51.907070] ? __do_page_fault+0xd60/0xd60 [ 51.911266] ? putname+0xf3/0x130 [ 51.914684] do_group_exit+0x149/0x400 [ 51.918535] ? lockdep_sys_exit+0x47/0xf0 [ 51.922644] ? SyS_exit+0x30/0x30 [ 51.926060] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.931043] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 51.935763] SyS_exit_group+0x1d/0x20 [ 51.939530] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.944247] RIP: 0033:0x444e99 [ 51.947401] RSP: 002b:00007ffe726d6778 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 51.955071] RAX: ffffffffffffffda RBX: 00007ffe726d67c0 RCX: 0000000000444e99 [ 51.962305] RDX: 0000000000444e99 RSI: 00000000207cdff1 RDI: 0000000000000001 [ 51.969538] RBP: 0000000000000086 R08: 0000000000000000 R09: 00007ffe726d67c0 [ 51.976773] R10: 0000000000000000 R11: 0000000000000202 R12: 00000000004021e0 [ 51.984006] R13: 0000000000402270 R14: 0000000000000000 R15: 0000000000000000 [ 51.991286] Dumping ftrace buffer: