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-1,10.128.15.211' (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: [ 41.058327] ================================================================== [ 41.059441] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 41.060350] Write of size 8 at addr ffff8801c0b23740 by task syzkaller219473/2982 [ 41.061355] [ 41.061597] CPU: 0 PID: 2982 Comm: syzkaller219473 Not tainted 4.14.0-rc2+ #20 [ 41.062564] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.063789] Call Trace: [ 41.064154] dump_stack+0x194/0x257 [ 41.064653] ? arch_local_irq_restore+0x53/0x53 [ 41.065305] ? show_regs_print_info+0x65/0x65 [ 41.065913] ? lock_timer_base+0x1a3/0x2b0 [ 41.066485] ? detach_if_pending+0x557/0x610 [ 41.067105] print_address_description+0x73/0x250 [ 41.067779] ? detach_if_pending+0x557/0x610 [ 41.068398] kasan_report+0x25b/0x340 [ 41.068919] __asan_report_store8_noabort+0x17/0x20 [ 41.069588] detach_if_pending+0x557/0x610 [ 41.070163] ? trace_raw_output_tick_stop+0x130/0x130 [ 41.070857] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 41.071482] ? lock_timer_base+0x1a3/0x2b0 [ 41.072058] ? lock_timer_base+0x1eb/0x2b0 [ 41.072634] ? __internal_add_timer+0x2d0/0x2d0 [ 41.073265] ? trace_hardirqs_on+0xd/0x10 [ 41.073835] try_to_del_timer_sync+0xa2/0x120 [ 41.074454] ? del_timer+0x130/0x130 [ 41.074978] ? del_timer_sync+0xeb/0x240 [ 41.075533] del_timer_sync+0x18a/0x240 [ 41.076075] tun_free_netdev+0x105/0x1b0 [ 41.076623] ? tun_xdp+0x410/0x410 [ 41.077118] ? cpumask_next+0x24/0x30 [ 41.077637] ? netdev_refcnt_read+0xed/0x150 [ 41.078234] ? tun_xdp+0x410/0x410 [ 41.078717] netdev_run_todo+0x870/0xca0 [ 41.082753] ? do_group_exit+0x149/0x400 [ 41.086790] ? register_netdev+0x30/0x30 [ 41.090969] ? lock_downgrade+0x990/0x990 [ 41.095095] ? trace_hardirqs_on+0xd/0x10 [ 41.099233] ? refcount_sub_and_test+0x115/0x1b0 [ 41.103960] ? refcount_inc+0x50/0x50 [ 41.107732] ? refcount_inc+0x50/0x50 [ 41.111512] ? sk_destruct+0x4c/0x80 [ 41.115199] ? __sk_free+0x5c/0x230 [ 41.118797] ? sk_free+0x2f/0x40 [ 41.122134] ? __tun_detach+0x176/0x1390 [ 41.126180] ? tun_attach+0xf90/0xf90 [ 41.129968] ? locks_remove_file+0x3fa/0x5a0 [ 41.134352] ? fcntl_setlk+0x10d0/0x10d0 [ 41.138392] ? __fsnotify_parent+0xb4/0x3a0 [ 41.142689] ? fsnotify+0x1af0/0x1af0 [ 41.146464] ? __tun_detach+0x1390/0x1390 [ 41.150583] ? __tun_detach+0x1390/0x1390 [ 41.154701] rtnl_unlock+0xe/0x10 [ 41.158126] tun_chr_close+0x49/0x60 [ 41.161812] __fput+0x333/0x7f0 [ 41.165072] ? fput+0x140/0x140 [ 41.168324] ? check_same_owner+0x320/0x320 [ 41.172624] ____fput+0x15/0x20 [ 41.175879] task_work_run+0x199/0x270 [ 41.179741] ? task_work_cancel+0x210/0x210 [ 41.184036] ? free_nsproxy+0x185/0x1f0 [ 41.187986] ? switch_task_namespaces+0xa2/0xc0 [ 41.192630] do_exit+0x9d2/0x1af0 [ 41.196052] ? trace_hardirqs_on+0xd/0x10 [ 41.200177] ? mm_update_next_owner+0x930/0x930 [ 41.204824] ? lock_acquire+0x1d5/0x580 [ 41.208769] ? __handle_mm_fault+0xf07/0x39c0 [ 41.213242] ? lock_release+0xd70/0xd70 [ 41.217187] ? check_noncircular+0x20/0x20 [ 41.221393] ? kvfree+0x3b/0x60 [ 41.224648] ? rtnl_unlock+0xe/0x10 [ 41.228255] ? check_noncircular+0x20/0x20 [ 41.232463] ? __handle_mm_fault+0x587/0x39c0 [ 41.236935] ? __pmd_alloc+0x4e0/0x4e0 [ 41.240803] ? find_held_lock+0x39/0x1d0 [ 41.244846] ? lock_downgrade+0x990/0x990 [ 41.248988] do_group_exit+0x149/0x400 [ 41.252843] ? __handle_mm_fault+0x39c0/0x39c0 [ 41.257392] ? vmacache_find+0x5f/0x280 [ 41.261337] ? SyS_exit+0x30/0x30 [ 41.264768] ? do_fast_syscall_32+0x158/0xf05 [ 41.269236] ? do_group_exit+0x400/0x400 [ 41.273266] SyS_exit_group+0x1d/0x20 [ 41.277037] do_fast_syscall_32+0x3f2/0xf05 [ 41.281335] ? do_int80_syscall_32+0x940/0x940 [ 41.285889] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.290617] ? lockdep_sys_exit+0x47/0xf0 [ 41.294737] ? syscall_return_slowpath+0x2b3/0x510 [ 41.299639] ? lockdep_sys_exit+0x47/0xf0 [ 41.303758] ? retint_user+0x18/0x20 [ 41.307447] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.312268] entry_SYSENTER_compat+0x51/0x60 [ 41.316646] RIP: 0023:0xf7ffbc79 [ 41.319981] RSP: 002b:00000000ffb9dd8c EFLAGS: 00000286 ORIG_RAX: 00000000000000fc [ 41.327661] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000000000 [ 41.334899] RDX: 0000000000000000 RSI: 0000000020661fd8 RDI: 00000000400454ca [ 41.342138] RBP: 00000000080729a6 R08: 0000000000000000 R09: 0000000000000000 [ 41.349389] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 41.356628] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 41.363886] [ 41.365488] Allocated by task 2982: [ 41.369089] save_stack_trace+0x16/0x20 [ 41.373033] save_stack+0x43/0xd0 [ 41.376455] kasan_kmalloc+0xad/0xe0 [ 41.380147] __kmalloc_node+0x47/0x70 [ 41.383918] kvmalloc_node+0x64/0xd0 [ 41.387601] alloc_netdev_mqs+0x16e/0xed0 [ 41.391719] __tun_chr_ioctl+0x12be/0x3d20 [ 41.395924] tun_chr_compat_ioctl+0x29/0x30 [ 41.400214] compat_SyS_ioctl+0x1d7/0x3290 [ 41.404417] do_fast_syscall_32+0x3f2/0xf05 [ 41.408708] entry_SYSENTER_compat+0x51/0x60 [ 41.413082] [ 41.414680] Freed by task 2982: [ 41.417929] save_stack_trace+0x16/0x20 [ 41.421872] save_stack+0x43/0xd0 [ 41.425293] kasan_slab_free+0x71/0xc0 [ 41.429148] kfree+0xca/0x250 [ 41.432222] kvfree+0x36/0x60 [ 41.435294] free_netdev+0x2cf/0x360 [ 41.438995] __tun_chr_ioctl+0x2cf6/0x3d20 [ 41.443198] tun_chr_compat_ioctl+0x29/0x30 [ 41.447489] compat_SyS_ioctl+0x1d7/0x3290 [ 41.451691] do_fast_syscall_32+0x3f2/0xf05 [ 41.455985] entry_SYSENTER_compat+0x51/0x60 [ 41.460358] [ 41.461957] The buggy address belongs to the object at ffff8801c0b20340 [ 41.461957] which belongs to the cache kmalloc-16384 of size 16384 [ 41.474929] The buggy address is located 13312 bytes inside of [ 41.474929] 16384-byte region [ffff8801c0b20340, ffff8801c0b24340) [ 41.487118] The buggy address belongs to the page: [ 41.492016] page:ffffea000702c800 count:1 mapcount:0 mapping:ffff8801c0b20340 index:0x0 compound_mapcount: 0 [ 41.501975] flags: 0x200000000008100(slab|head) [ 41.506619] raw: 0200000000008100 ffff8801c0b20340 0000000000000000 0000000100000001 [ 41.514470] raw: ffffea0007375420 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 41.522320] page dumped because: kasan: bad access detected [ 41.527997] [ 41.529591] Memory state around the buggy address: [ 41.534491] ffff8801c0b23600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.541819] ffff8801c0b23680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.549146] >ffff8801c0b23700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.556476] ^ [ 41.561902] ffff8801c0b23780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.569230] ffff8801c0b23800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.576555] ================================================================== [ 41.583880] Disabling lock debugging due to kernel taint [ 41.589292] Kernel panic - not syncing: panic_on_warn set ... [ 41.589292] [ 41.596617] CPU: 0 PID: 2982 Comm: syzkaller219473 Tainted: G B 4.14.0-rc2+ #20 [ 41.605154] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.614473] Call Trace: [ 41.617031] dump_stack+0x194/0x257 [ 41.620626] ? arch_local_irq_restore+0x53/0x53 [ 41.625265] ? vprintk_default+0x28/0x30 [ 41.629294] ? detach_if_pending+0x4d0/0x610 [ 41.633670] panic+0x1e4/0x417 [ 41.636828] ? __warn+0x1d9/0x1d9 [ 41.640253] ? detach_if_pending+0x557/0x610 [ 41.644624] kasan_end_report+0x50/0x50 [ 41.648563] kasan_report+0x144/0x340 [ 41.652329] __asan_report_store8_noabort+0x17/0x20 [ 41.657310] detach_if_pending+0x557/0x610 [ 41.661509] ? trace_raw_output_tick_stop+0x130/0x130 [ 41.666663] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 41.671297] ? lock_timer_base+0x1a3/0x2b0 [ 41.675497] ? lock_timer_base+0x1eb/0x2b0 [ 41.679696] ? __internal_add_timer+0x2d0/0x2d0 [ 41.684330] ? trace_hardirqs_on+0xd/0x10 [ 41.688445] try_to_del_timer_sync+0xa2/0x120 [ 41.692904] ? del_timer+0x130/0x130 [ 41.696581] ? del_timer_sync+0xeb/0x240 [ 41.700607] del_timer_sync+0x18a/0x240 [ 41.704549] tun_free_netdev+0x105/0x1b0 [ 41.708574] ? tun_xdp+0x410/0x410 [ 41.712076] ? cpumask_next+0x24/0x30 [ 41.715841] ? netdev_refcnt_read+0xed/0x150 [ 41.720215] ? tun_xdp+0x410/0x410 [ 41.723718] netdev_run_todo+0x870/0xca0 [ 41.727743] ? do_group_exit+0x149/0x400 [ 41.731770] ? register_netdev+0x30/0x30 [ 41.735796] ? lock_downgrade+0x990/0x990 [ 41.739911] ? trace_hardirqs_on+0xd/0x10 [ 41.744034] ? refcount_sub_and_test+0x115/0x1b0 [ 41.748752] ? refcount_inc+0x50/0x50 [ 41.752519] ? refcount_inc+0x50/0x50 [ 41.756287] ? sk_destruct+0x4c/0x80 [ 41.759964] ? __sk_free+0x5c/0x230 [ 41.763556] ? sk_free+0x2f/0x40 [ 41.766886] ? __tun_detach+0x176/0x1390 [ 41.770918] ? tun_attach+0xf90/0xf90 [ 41.774691] ? locks_remove_file+0x3fa/0x5a0 [ 41.779066] ? fcntl_setlk+0x10d0/0x10d0 [ 41.783095] ? __fsnotify_parent+0xb4/0x3a0 [ 41.787385] ? fsnotify+0x1af0/0x1af0 [ 41.791152] ? __tun_detach+0x1390/0x1390 [ 41.795263] ? __tun_detach+0x1390/0x1390 [ 41.799378] rtnl_unlock+0xe/0x10 [ 41.802795] tun_chr_close+0x49/0x60 [ 41.806475] __fput+0x333/0x7f0 [ 41.809724] ? fput+0x140/0x140 [ 41.812972] ? check_same_owner+0x320/0x320 [ 41.817261] ____fput+0x15/0x20 [ 41.820508] task_work_run+0x199/0x270 [ 41.824360] ? task_work_cancel+0x210/0x210 [ 41.828655] ? free_nsproxy+0x185/0x1f0 [ 41.833064] ? switch_task_namespaces+0xa2/0xc0 [ 41.837701] do_exit+0x9d2/0x1af0 [ 41.841118] ? trace_hardirqs_on+0xd/0x10 [ 41.845232] ? mm_update_next_owner+0x930/0x930 [ 41.849864] ? lock_acquire+0x1d5/0x580 [ 41.853802] ? __handle_mm_fault+0xf07/0x39c0 [ 41.858265] ? lock_release+0xd70/0xd70 [ 41.862206] ? check_noncircular+0x20/0x20 [ 41.866408] ? kvfree+0x3b/0x60 [ 41.869657] ? rtnl_unlock+0xe/0x10 [ 41.873249] ? check_noncircular+0x20/0x20 [ 41.877451] ? __handle_mm_fault+0x587/0x39c0 [ 41.881912] ? __pmd_alloc+0x4e0/0x4e0 [ 41.885769] ? find_held_lock+0x39/0x1d0 [ 41.889800] ? lock_downgrade+0x990/0x990 [ 41.893925] do_group_exit+0x149/0x400 [ 41.897775] ? __handle_mm_fault+0x39c0/0x39c0 [ 41.902320] ? vmacache_find+0x5f/0x280 [ 41.906256] ? SyS_exit+0x30/0x30 [ 41.909686] ? do_fast_syscall_32+0x158/0xf05 [ 41.914144] ? do_group_exit+0x400/0x400 [ 41.918170] SyS_exit_group+0x1d/0x20 [ 41.921935] do_fast_syscall_32+0x3f2/0xf05 [ 41.926228] ? do_int80_syscall_32+0x940/0x940 [ 41.930774] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.935518] ? lockdep_sys_exit+0x47/0xf0 [ 41.939631] ? syscall_return_slowpath+0x2b3/0x510 [ 41.944525] ? lockdep_sys_exit+0x47/0xf0 [ 41.948640] ? retint_user+0x18/0x20 [ 41.952321] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.957133] entry_SYSENTER_compat+0x51/0x60 [ 41.961505] RIP: 0023:0xf7ffbc79 [ 41.964831] RSP: 002b:00000000ffb9dd8c EFLAGS: 00000286 ORIG_RAX: 00000000000000fc [ 41.972502] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 0000000000000000 [ 41.979737] RDX: 0000000000000000 RSI: 0000000020661fd8 RDI: 00000000400454ca [ 41.986974] RBP: 00000000080729a6 R08: 0000000000000000 R09: 0000000000000000 [ 41.994207] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 42.001443] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 42.009053] Dumping ftrace buffer: [ 42.012556] (ftrace buffer empty) [ 42.016234] Kernel Offset: disabled [ 42.019828] Rebooting in 86400 seconds..