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-0,10.128.15.228' (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: [ 35.045492] ================================================================== [ 35.046594] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 35.047486] Write of size 8 at addr ffff8801ce5db780 by task syzkaller284670/2982 [ 35.048486] [ 35.048740] CPU: 0 PID: 2982 Comm: syzkaller284670 Not tainted 4.14.0-rc4-mm1+ #16 [ 35.049752] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.050973] Call Trace: [ 35.051339] dump_stack+0x194/0x257 [ 35.051848] ? arch_local_irq_restore+0x53/0x53 [ 35.052476] ? show_regs_print_info+0x65/0x65 [ 35.053087] ? lock_timer_base+0x1a3/0x2b0 [ 35.053663] ? detach_if_pending+0x557/0x610 [ 35.054260] print_address_description+0x73/0x250 [ 35.054909] ? detach_if_pending+0x557/0x610 [ 35.055506] kasan_report+0x25b/0x340 [ 35.056035] __asan_report_store8_noabort+0x17/0x20 [ 35.056721] detach_if_pending+0x557/0x610 [ 35.057294] ? trace_raw_output_tick_stop+0x130/0x130 [ 35.057988] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 35.058612] ? lock_timer_base+0x1a3/0x2b0 [ 35.059181] ? lock_timer_base+0x1eb/0x2b0 [ 35.059757] ? __internal_add_timer+0x2d0/0x2d0 [ 35.060403] ? trace_hardirqs_on+0xd/0x10 [ 35.060971] try_to_del_timer_sync+0xa2/0x120 [ 35.061575] ? del_timer+0x130/0x130 [ 35.062083] ? del_timer_sync+0xeb/0x240 [ 35.062641] del_timer_sync+0x18a/0x240 [ 35.063184] tun_free_netdev+0x105/0x1b0 [ 35.063735] ? tun_xdp+0x410/0x410 [ 35.064217] ? cpumask_next+0x24/0x30 [ 35.064740] ? netdev_refcnt_read+0xed/0x150 [ 35.065358] netdev_run_todo+0x683/0xae0 [ 35.067865] ? tun_xdp+0x410/0x410 [ 35.071379] ? register_netdev+0x30/0x30 [ 35.075411] ? refcount_inc+0x50/0x50 [ 35.079186] ? refcount_inc+0x50/0x50 [ 35.082960] ? sk_destruct+0x4c/0x80 [ 35.086648] ? __sk_free+0x5c/0x230 [ 35.090248] ? sk_free+0x2f/0x40 [ 35.093589] ? __tun_detach+0x760/0x1570 [ 35.097648] ? locks_remove_file+0x3fa/0x5a0 [ 35.102030] ? fcntl_setlk+0x10d0/0x10d0 [ 35.106077] ? fsnotify+0x1af0/0x1af0 [ 35.109859] ? __tun_detach+0x1570/0x1570 [ 35.113981] rtnl_unlock+0xe/0x10 [ 35.117404] tun_chr_close+0x49/0x60 [ 35.121091] __fput+0x333/0x7f0 [ 35.124348] ? fput+0x140/0x140 [ 35.127602] ? check_same_owner+0x320/0x320 [ 35.131903] ____fput+0x15/0x20 [ 35.135155] task_work_run+0x199/0x270 [ 35.139017] ? task_work_cancel+0x210/0x210 [ 35.143312] ? free_nsproxy+0x185/0x1f0 [ 35.147257] ? switch_task_namespaces+0xa2/0xc0 [ 35.151901] do_exit+0x9c8/0x1b00 [ 35.155330] ? mm_update_next_owner+0x930/0x930 [ 35.159971] ? find_held_lock+0x39/0x1d0 [ 35.164016] ? lock_downgrade+0x990/0x990 [ 35.168158] ? handle_mm_fault+0x410/0x8d0 [ 35.172364] ? __do_page_fault+0x31e/0xd60 [ 35.176571] ? __handle_mm_fault+0x39c0/0x39c0 [ 35.181124] ? vmacache_find+0x5f/0x280 [ 35.185079] ? up_read+0x1a/0x40 [ 35.188416] ? __do_page_fault+0x3d6/0xd60 [ 35.192630] ? mm_fault_error+0x2c0/0x2c0 [ 35.196747] ? do_vfs_ioctl+0x492/0x1530 [ 35.200786] ? do_page_fault+0xee/0x720 [ 35.204732] ? __do_page_fault+0xd60/0xd60 [ 35.208942] ? putname+0xf3/0x130 [ 35.212373] do_group_exit+0x149/0x400 [ 35.216230] ? lockdep_sys_exit+0x47/0xf0 [ 35.220351] ? SyS_exit+0x30/0x30 [ 35.223777] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.228765] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.233494] SyS_exit_group+0x1d/0x20 [ 35.237266] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.241991] RIP: 0033:0x445169 [ 35.245152] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 35.252833] RAX: ffffffffffffffda RBX: bdc3ab50d565110b RCX: 0000000000445169 [ 35.260077] RDX: 0000000000445169 RSI: 000000002023f000 RDI: 0000000000000001 [ 35.267319] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 35.274558] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027c0 [ 35.281799] R13: 0000000000402850 R14: 0000000000000000 R15: 0000000000000000 [ 35.289062] [ 35.290660] Allocated by task 2982: [ 35.294258] save_stack+0x43/0xd0 [ 35.297682] kasan_kmalloc+0xad/0xe0 [ 35.301366] __kmalloc_node+0x47/0x70 [ 35.305136] kvmalloc_node+0x64/0xd0 [ 35.308819] alloc_netdev_mqs+0x16d/0xed0 [ 35.312939] __tun_chr_ioctl+0x1386/0x3e40 [ 35.317141] tun_chr_ioctl+0x2a/0x40 [ 35.320824] do_vfs_ioctl+0x1b1/0x1530 [ 35.324682] SyS_ioctl+0x8f/0xc0 [ 35.328018] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.332737] [ 35.334333] Freed by task 2982: [ 35.337580] save_stack+0x43/0xd0 [ 35.341001] kasan_slab_free+0x71/0xc0 [ 35.344854] kfree+0xca/0x250 [ 35.347928] kvfree+0x36/0x60 [ 35.351001] free_netdev+0x2cf/0x360 [ 35.354683] __tun_chr_ioctl+0x2df6/0x3e40 [ 35.358884] tun_chr_ioctl+0x2a/0x40 [ 35.362565] do_vfs_ioctl+0x1b1/0x1530 [ 35.366419] SyS_ioctl+0x8f/0xc0 [ 35.369757] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.374481] [ 35.376079] The buggy address belongs to the object at ffff8801ce5d8380 [ 35.376079] which belongs to the cache kmalloc-16384 of size 16384 [ 35.389051] The buggy address is located 13312 bytes inside of [ 35.389051] 16384-byte region [ffff8801ce5d8380, ffff8801ce5dc380) [ 35.401244] The buggy address belongs to the page: [ 35.406144] page:ffffea0007397600 count:1 mapcount:0 mapping:ffff8801ce5d8380 index:0x0 compound_mapcount: 0 [ 35.416089] flags: 0x200000000008100(slab|head) [ 35.420728] raw: 0200000000008100 ffff8801ce5d8380 0000000000000000 0000000100000001 [ 35.428580] raw: ffffea0007389020 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 35.436425] page dumped because: kasan: bad access detected [ 35.442100] [ 35.443697] Memory state around the buggy address: [ 35.448608] ffff8801ce5db680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.455958] ffff8801ce5db700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.463307] >ffff8801ce5db780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.470654] ^ [ 35.473990] ffff8801ce5db800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.481317] ffff8801ce5db880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 35.488643] ================================================================== [ 35.495969] Disabling lock debugging due to kernel taint [ 35.501379] Kernel panic - not syncing: panic_on_warn set ... [ 35.501379] [ 35.508704] CPU: 0 PID: 2982 Comm: syzkaller284670 Tainted: G B 4.14.0-rc4-mm1+ #16 [ 35.517677] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 35.526993] Call Trace: [ 35.529548] dump_stack+0x194/0x257 [ 35.533141] ? arch_local_irq_restore+0x53/0x53 [ 35.537777] ? vprintk_default+0x28/0x30 [ 35.541803] ? detach_if_pending+0x540/0x610 [ 35.546178] panic+0x1e4/0x41c [ 35.549336] ? refcount_error_report+0x214/0x214 [ 35.554063] ? detach_if_pending+0x557/0x610 [ 35.558434] kasan_end_report+0x50/0x50 [ 35.562374] kasan_report+0x144/0x340 [ 35.566139] __asan_report_store8_noabort+0x17/0x20 [ 35.571117] detach_if_pending+0x557/0x610 [ 35.575316] ? trace_raw_output_tick_stop+0x130/0x130 [ 35.580476] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 35.585106] ? lock_timer_base+0x1a3/0x2b0 [ 35.589303] ? lock_timer_base+0x1eb/0x2b0 [ 35.593504] ? __internal_add_timer+0x2d0/0x2d0 [ 35.598137] ? trace_hardirqs_on+0xd/0x10 [ 35.602252] try_to_del_timer_sync+0xa2/0x120 [ 35.606710] ? del_timer+0x130/0x130 [ 35.610391] ? del_timer_sync+0xeb/0x240 [ 35.614418] del_timer_sync+0x18a/0x240 [ 35.618358] tun_free_netdev+0x105/0x1b0 [ 35.622381] ? tun_xdp+0x410/0x410 [ 35.625884] ? cpumask_next+0x24/0x30 [ 35.629650] ? netdev_refcnt_read+0xed/0x150 [ 35.634027] netdev_run_todo+0x683/0xae0 [ 35.638056] ? tun_xdp+0x410/0x410 [ 35.641559] ? register_netdev+0x30/0x30 [ 35.645586] ? refcount_inc+0x50/0x50 [ 35.649350] ? refcount_inc+0x50/0x50 [ 35.653117] ? sk_destruct+0x4c/0x80 [ 35.656795] ? __sk_free+0x5c/0x230 [ 35.660383] ? sk_free+0x2f/0x40 [ 35.663714] ? __tun_detach+0x760/0x1570 [ 35.667750] ? locks_remove_file+0x3fa/0x5a0 [ 35.672122] ? fcntl_setlk+0x10d0/0x10d0 [ 35.676150] ? fsnotify+0x1af0/0x1af0 [ 35.679919] ? __tun_detach+0x1570/0x1570 [ 35.684030] rtnl_unlock+0xe/0x10 [ 35.687450] tun_chr_close+0x49/0x60 [ 35.691130] __fput+0x333/0x7f0 [ 35.694374] ? fput+0x140/0x140 [ 35.697618] ? check_same_owner+0x320/0x320 [ 35.701908] ____fput+0x15/0x20 [ 35.705151] task_work_run+0x199/0x270 [ 35.709001] ? task_work_cancel+0x210/0x210 [ 35.713287] ? free_nsproxy+0x185/0x1f0 [ 35.717223] ? switch_task_namespaces+0xa2/0xc0 [ 35.721855] do_exit+0x9c8/0x1b00 [ 35.725273] ? mm_update_next_owner+0x930/0x930 [ 35.729906] ? find_held_lock+0x39/0x1d0 [ 35.733938] ? lock_downgrade+0x990/0x990 [ 35.738062] ? handle_mm_fault+0x410/0x8d0 [ 35.742260] ? __do_page_fault+0x31e/0xd60 [ 35.746457] ? __handle_mm_fault+0x39c0/0x39c0 [ 35.750999] ? vmacache_find+0x5f/0x280 [ 35.754939] ? up_read+0x1a/0x40 [ 35.758269] ? __do_page_fault+0x3d6/0xd60 [ 35.762470] ? mm_fault_error+0x2c0/0x2c0 [ 35.766581] ? do_vfs_ioctl+0x492/0x1530 [ 35.770608] ? do_page_fault+0xee/0x720 [ 35.774552] ? __do_page_fault+0xd60/0xd60 [ 35.778750] ? putname+0xf3/0x130 [ 35.782170] do_group_exit+0x149/0x400 [ 35.786020] ? lockdep_sys_exit+0x47/0xf0 [ 35.790130] ? SyS_exit+0x30/0x30 [ 35.793547] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 35.798527] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 35.803246] SyS_exit_group+0x1d/0x20 [ 35.807010] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 35.811727] RIP: 0033:0x445169 [ 35.814882] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 35.822552] RAX: ffffffffffffffda RBX: bdc3ab50d565110b RCX: 0000000000445169 [ 35.829786] RDX: 0000000000445169 RSI: 000000002023f000 RDI: 0000000000000001 [ 35.837017] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 35.844250] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027c0 [ 35.851483] R13: 0000000000402850 R14: 0000000000000000 R15: 0000000000000000