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.0.35' (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: [ 44.949395] ================================================================== [ 44.950542] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 44.951431] Write of size 8 at addr ffff8801d183b6b8 by task syzkaller452461/2986 [ 44.952427] [ 44.952662] CPU: 1 PID: 2986 Comm: syzkaller452461 Not tainted 4.14.0-rc5+ #49 [ 44.953628] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.954849] Call Trace: [ 44.955212] dump_stack+0x194/0x257 [ 44.955707] ? arch_local_irq_restore+0x53/0x53 [ 44.956334] ? show_regs_print_info+0x65/0x65 [ 44.956951] ? lock_acquire+0x1d5/0x580 [ 44.957501] ? lock_timer_base+0x1a3/0x2b0 [ 44.958072] ? detach_if_pending+0x557/0x610 [ 44.958664] print_address_description+0x73/0x250 [ 44.959358] ? detach_if_pending+0x557/0x610 [ 44.959949] kasan_report+0x25b/0x340 [ 44.960466] __asan_report_store8_noabort+0x17/0x20 [ 44.961134] detach_if_pending+0x557/0x610 [ 44.961707] ? trace_raw_output_tick_stop+0x130/0x130 [ 44.962411] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 44.963047] ? lock_timer_base+0x1a3/0x2b0 [ 44.963616] ? lock_timer_base+0x1eb/0x2b0 [ 44.964188] ? __internal_add_timer+0x2d0/0x2d0 [ 44.964813] ? lock_downgrade+0x990/0x990 [ 44.965368] ? trace_hardirqs_on+0xd/0x10 [ 44.965931] try_to_del_timer_sync+0xa2/0x120 [ 44.966534] ? del_timer+0x130/0x130 [ 44.967035] ? del_timer_sync+0xeb/0x240 [ 44.967588] del_timer_sync+0x18a/0x240 [ 44.968132] tun_free_netdev+0x105/0x1b0 [ 44.968701] ? tun_xdp+0x410/0x410 [ 44.969212] ? cpumask_next+0x24/0x30 [ 44.969732] ? netdev_refcnt_read+0xed/0x150 [ 44.974114] ? tun_xdp+0x410/0x410 [ 44.977627] netdev_run_todo+0x870/0xca0 [ 44.981658] ? do_group_exit+0x149/0x400 [ 44.985691] ? mark_held_locks+0xaf/0x100 [ 44.989808] ? register_netdev+0x30/0x30 [ 44.993840] ? find_held_lock+0x35/0x1d0 [ 44.997881] ? lock_downgrade+0x990/0x990 [ 45.002004] ? refcount_sub_and_test+0x115/0x1b0 [ 45.006729] ? refcount_inc+0x50/0x50 [ 45.010499] ? refcount_inc+0x50/0x50 [ 45.014274] ? sk_destruct+0x4c/0x80 [ 45.017957] ? __sk_free+0x5c/0x230 [ 45.021555] ? sk_free+0x2f/0x40 [ 45.024892] ? __tun_detach+0x176/0x1390 [ 45.028933] ? tun_attach+0xfa0/0xfa0 [ 45.032707] ? lock_downgrade+0x990/0x990 [ 45.036826] ? locks_remove_file+0x3fa/0x5a0 [ 45.041204] ? fcntl_setlk+0x10c0/0x10c0 [ 45.045235] ? __fsnotify_parent+0xb4/0x3a0 [ 45.049526] ? fsnotify+0x1af0/0x1af0 [ 45.053301] ? __tun_detach+0x1390/0x1390 [ 45.057416] ? __tun_detach+0x1390/0x1390 [ 45.061532] rtnl_unlock+0xe/0x10 [ 45.064955] tun_chr_close+0x49/0x60 [ 45.068642] __fput+0x327/0x7e0 [ 45.071897] ? fput+0x140/0x140 [ 45.075149] ? check_same_owner+0x320/0x320 [ 45.079448] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.083919] ____fput+0x15/0x20 [ 45.087169] task_work_run+0x199/0x270 [ 45.091028] ? task_work_cancel+0x210/0x210 [ 45.095318] ? _raw_spin_unlock+0x22/0x30 [ 45.099435] ? switch_task_namespaces+0x87/0xc0 [ 45.104079] do_exit+0x9b5/0x1ad0 [ 45.107501] ? __handle_mm_fault+0xf07/0x39c0 [ 45.111969] ? mm_update_next_owner+0x930/0x930 [ 45.116604] ? lock_release+0xa40/0xa40 [ 45.120547] ? do_raw_spin_trylock+0x190/0x190 [ 45.125104] ? kfree+0xe4/0x250 [ 45.128352] ? kvfree+0x36/0x60 [ 45.131614] ? __handle_mm_fault+0x587/0x39c0 [ 45.136081] ? check_noncircular+0x20/0x20 [ 45.140282] ? __pmd_alloc+0x4e0/0x4e0 [ 45.144149] ? find_held_lock+0x35/0x1d0 [ 45.148184] ? handle_mm_fault+0x248/0x8d0 [ 45.152392] ? find_held_lock+0x35/0x1d0 [ 45.156429] ? __do_page_fault+0x64c/0xd60 [ 45.160633] ? lock_downgrade+0x990/0x990 [ 45.164755] ? handle_mm_fault+0x410/0x8d0 [ 45.168956] ? down_read_trylock+0xdb/0x170 [ 45.173243] ? __do_page_fault+0x31e/0xd60 [ 45.177448] ? __handle_mm_fault+0x39c0/0x39c0 [ 45.181997] ? vmacache_find+0x5f/0x280 [ 45.185938] ? vmacache_update+0xfe/0x130 [ 45.190059] do_group_exit+0x149/0x400 [ 45.193914] ? __do_page_fault+0x3d6/0xd60 [ 45.198118] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 45.202499] ? SyS_exit+0x30/0x30 [ 45.205930] ? do_fast_syscall_32+0x158/0xf05 [ 45.210394] ? do_group_exit+0x400/0x400 [ 45.214427] SyS_exit_group+0x1d/0x20 [ 45.218197] do_fast_syscall_32+0x3f2/0xf05 [ 45.222492] ? do_int80_syscall_32+0x940/0x940 [ 45.227045] ? kasan_check_read+0x11/0x20 [ 45.231162] ? syscall_return_slowpath+0x510/0x510 [ 45.236061] ? SyS_rt_sigaction+0x94/0x1b0 [ 45.240266] ? SyS_sigprocmask+0x4b0/0x4b0 [ 45.244472] ? SyS_read+0x184/0x220 [ 45.248070] ? retint_user+0x18/0x20 [ 45.251757] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 45.256575] entry_SYSENTER_compat+0x51/0x60 [ 45.260954] RIP: 0023:0xf7f82c79 [ 45.264289] RSP: 002b:00000000ffdf928c EFLAGS: 00000292 ORIG_RAX: 00000000000000fc [ 45.271967] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000080f2298 [ 45.279205] RDX: 0000000000000000 RSI: 00000000080db5b8 RDI: 00000000080f22a0 [ 45.286444] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 45.293681] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 45.300917] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 45.308174] [ 45.309772] Allocated by task 2986: [ 45.313377] save_stack_trace+0x16/0x20 [ 45.317320] save_stack+0x43/0xd0 [ 45.320740] kasan_kmalloc+0xad/0xe0 [ 45.324420] __kmalloc_node+0x47/0x70 [ 45.328189] kvmalloc_node+0x64/0xd0 [ 45.331872] alloc_netdev_mqs+0x16e/0xed0 [ 45.335989] __tun_chr_ioctl+0x12b2/0x3d20 [ 45.340190] tun_chr_compat_ioctl+0x29/0x30 [ 45.344480] compat_SyS_ioctl+0x1d7/0x3290 [ 45.348687] do_fast_syscall_32+0x3f2/0xf05 [ 45.352977] entry_SYSENTER_compat+0x51/0x60 [ 45.357350] [ 45.358944] Freed by task 2986: [ 45.362192] save_stack_trace+0x16/0x20 [ 45.366132] save_stack+0x43/0xd0 [ 45.369548] kasan_slab_free+0x71/0xc0 [ 45.373400] kfree+0xca/0x250 [ 45.376471] kvfree+0x36/0x60 [ 45.379544] free_netdev+0x2cf/0x360 [ 45.383226] __tun_chr_ioctl+0x2cea/0x3d20 [ 45.387436] tun_chr_compat_ioctl+0x29/0x30 [ 45.391730] compat_SyS_ioctl+0x1d7/0x3290 [ 45.395931] do_fast_syscall_32+0x3f2/0xf05 [ 45.400223] entry_SYSENTER_compat+0x51/0x60 [ 45.404594] [ 45.406192] The buggy address belongs to the object at ffff8801d1838380 [ 45.406192] which belongs to the cache kmalloc-16384 of size 16384 [ 45.419162] The buggy address is located 13112 bytes inside of [ 45.419162] 16384-byte region [ffff8801d1838380, ffff8801d183c380) [ 45.431349] The buggy address belongs to the page: [ 45.436245] page:ffffea0007460e00 count:1 mapcount:0 mapping:ffff8801d1838380 index:0x0 compound_mapcount: 0 [ 45.446180] flags: 0x200000000008100(slab|head) [ 45.450817] raw: 0200000000008100 ffff8801d1838380 0000000000000000 0000000100000001 [ 45.458664] raw: ffffea000749ca20 ffff8801dac01c48 ffff8801dac02200 0000000000000000 [ 45.466507] page dumped because: kasan: bad access detected [ 45.472181] [ 45.473775] Memory state around the buggy address: [ 45.478670] ffff8801d183b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.485997] ffff8801d183b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.493351] >ffff8801d183b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.500685] ^ [ 45.505844] ffff8801d183b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.513169] ffff8801d183b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 45.520493] ================================================================== [ 45.527816] Disabling lock debugging due to kernel taint [ 45.533229] Kernel panic - not syncing: panic_on_warn set ... [ 45.533229] [ 45.540558] CPU: 1 PID: 2986 Comm: syzkaller452461 Tainted: G B 4.14.0-rc5+ #49 [ 45.549096] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.558414] Call Trace: [ 45.560975] dump_stack+0x194/0x257 [ 45.564568] ? arch_local_irq_restore+0x53/0x53 [ 45.569202] ? kasan_end_report+0x32/0x50 [ 45.573317] ? lock_downgrade+0x990/0x990 [ 45.577432] ? detach_if_pending+0x510/0x610 [ 45.581813] panic+0x1e4/0x417 [ 45.584972] ? __warn+0x1d9/0x1d9 [ 45.588395] ? detach_if_pending+0x557/0x610 [ 45.592767] kasan_end_report+0x50/0x50 [ 45.596705] kasan_report+0x144/0x340 [ 45.601125] __asan_report_store8_noabort+0x17/0x20 [ 45.606110] detach_if_pending+0x557/0x610 [ 45.610313] ? trace_raw_output_tick_stop+0x130/0x130 [ 45.615472] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 45.620105] ? lock_timer_base+0x1a3/0x2b0 [ 45.624308] ? lock_timer_base+0x1eb/0x2b0 [ 45.628508] ? __internal_add_timer+0x2d0/0x2d0 [ 45.633149] ? lock_downgrade+0x990/0x990 [ 45.637263] ? trace_hardirqs_on+0xd/0x10 [ 45.641379] try_to_del_timer_sync+0xa2/0x120 [ 45.645840] ? del_timer+0x130/0x130 [ 45.649517] ? del_timer_sync+0xeb/0x240 [ 45.653555] del_timer_sync+0x18a/0x240 [ 45.657499] tun_free_netdev+0x105/0x1b0 [ 45.661531] ? tun_xdp+0x410/0x410 [ 45.665039] ? cpumask_next+0x24/0x30 [ 45.668807] ? netdev_refcnt_read+0xed/0x150 [ 45.673181] ? tun_xdp+0x410/0x410 [ 45.676687] netdev_run_todo+0x870/0xca0 [ 45.680714] ? do_group_exit+0x149/0x400 [ 45.684744] ? mark_held_locks+0xaf/0x100 [ 45.688855] ? register_netdev+0x30/0x30 [ 45.692882] ? find_held_lock+0x35/0x1d0 [ 45.696914] ? lock_downgrade+0x990/0x990 [ 45.701031] ? refcount_sub_and_test+0x115/0x1b0 [ 45.705750] ? refcount_inc+0x50/0x50 [ 45.709515] ? refcount_inc+0x50/0x50 [ 45.713284] ? sk_destruct+0x4c/0x80 [ 45.716969] ? __sk_free+0x5c/0x230 [ 45.720563] ? sk_free+0x2f/0x40 [ 45.723895] ? __tun_detach+0x176/0x1390 [ 45.727924] ? tun_attach+0xfa0/0xfa0 [ 45.731691] ? lock_downgrade+0x990/0x990 [ 45.735808] ? locks_remove_file+0x3fa/0x5a0 [ 45.740182] ? fcntl_setlk+0x10c0/0x10c0 [ 45.744211] ? __fsnotify_parent+0xb4/0x3a0 [ 45.748498] ? fsnotify+0x1af0/0x1af0 [ 45.752265] ? __tun_detach+0x1390/0x1390 [ 45.756376] ? __tun_detach+0x1390/0x1390 [ 45.760491] rtnl_unlock+0xe/0x10 [ 45.763908] tun_chr_close+0x49/0x60 [ 45.767589] __fput+0x327/0x7e0 [ 45.770847] ? fput+0x140/0x140 [ 45.774096] ? check_same_owner+0x320/0x320 [ 45.778385] ? _raw_spin_unlock_irq+0x27/0x70 [ 45.782848] ____fput+0x15/0x20 [ 45.786093] task_work_run+0x199/0x270 [ 45.789950] ? task_work_cancel+0x210/0x210 [ 45.794240] ? _raw_spin_unlock+0x22/0x30 [ 45.798353] ? switch_task_namespaces+0x87/0xc0 [ 45.802989] do_exit+0x9b5/0x1ad0 [ 45.806406] ? __handle_mm_fault+0xf07/0x39c0 [ 45.810867] ? mm_update_next_owner+0x930/0x930 [ 45.815501] ? lock_release+0xa40/0xa40 [ 45.819438] ? do_raw_spin_trylock+0x190/0x190 [ 45.823987] ? kfree+0xe4/0x250 [ 45.827234] ? kvfree+0x36/0x60 [ 45.830485] ? __handle_mm_fault+0x587/0x39c0 [ 45.834949] ? check_noncircular+0x20/0x20 [ 45.839146] ? __pmd_alloc+0x4e0/0x4e0 [ 45.843000] ? find_held_lock+0x35/0x1d0 [ 45.847028] ? handle_mm_fault+0x248/0x8d0 [ 45.851233] ? find_held_lock+0x35/0x1d0 [ 45.855262] ? __do_page_fault+0x64c/0xd60 [ 45.859466] ? lock_downgrade+0x990/0x990 [ 45.863585] ? handle_mm_fault+0x410/0x8d0 [ 45.867801] ? down_read_trylock+0xdb/0x170 [ 45.872096] ? __do_page_fault+0x31e/0xd60 [ 45.876300] ? __handle_mm_fault+0x39c0/0x39c0 [ 45.880852] ? vmacache_find+0x5f/0x280 [ 45.884792] ? vmacache_update+0xfe/0x130 [ 45.888910] do_group_exit+0x149/0x400 [ 45.892767] ? __do_page_fault+0x3d6/0xd60 [ 45.896966] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 45.901427] ? SyS_exit+0x30/0x30 [ 45.904852] ? do_fast_syscall_32+0x158/0xf05 [ 45.909313] ? do_group_exit+0x400/0x400 [ 45.913344] SyS_exit_group+0x1d/0x20 [ 45.917110] do_fast_syscall_32+0x3f2/0xf05 [ 45.921398] ? do_int80_syscall_32+0x940/0x940 [ 45.925947] ? kasan_check_read+0x11/0x20 [ 45.930060] ? syscall_return_slowpath+0x510/0x510 [ 45.934954] ? SyS_rt_sigaction+0x94/0x1b0 [ 45.939153] ? SyS_sigprocmask+0x4b0/0x4b0 [ 45.943350] ? SyS_read+0x184/0x220 [ 45.946948] ? retint_user+0x18/0x20