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-next-kasan-gce-3,10.128.15.230' (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: [ 33.441281] ================================================================== [ 33.448734] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 33.455457] Write of size 8 at addr ffff8801cd83b740 by task syzkaller526105/2983 [ 33.463043] [ 33.464643] CPU: 1 PID: 2983 Comm: syzkaller526105 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 33.473188] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.482512] Call Trace: [ 33.485074] dump_stack+0x194/0x257 [ 33.488676] ? arch_local_irq_restore+0x53/0x53 [ 33.493316] ? show_regs_print_info+0x65/0x65 [ 33.497787] ? lock_timer_base+0x1a3/0x2b0 [ 33.502003] ? detach_if_pending+0x557/0x610 [ 33.506387] print_address_description+0x73/0x250 [ 33.511202] ? detach_if_pending+0x557/0x610 [ 33.515583] kasan_report+0x25b/0x340 [ 33.519362] __asan_report_store8_noabort+0x17/0x20 [ 33.524351] detach_if_pending+0x557/0x610 [ 33.528563] ? trace_raw_output_tick_stop+0x130/0x130 [ 33.533727] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 33.538366] ? lock_timer_base+0x1a3/0x2b0 [ 33.542570] ? lock_timer_base+0x1eb/0x2b0 [ 33.546779] ? __internal_add_timer+0x2d0/0x2d0 [ 33.551419] ? trace_hardirqs_on+0xd/0x10 [ 33.555546] try_to_del_timer_sync+0xa2/0x120 [ 33.560012] ? del_timer+0x130/0x130 [ 33.563699] ? del_timer_sync+0xeb/0x240 [ 33.567736] del_timer_sync+0x18a/0x240 [ 33.571693] tun_free_netdev+0x105/0x1b0 [ 33.575726] ? tun_xdp+0x410/0x410 [ 33.579238] ? cpumask_next+0x24/0x30 [ 33.583011] ? netdev_refcnt_read+0xed/0x150 [ 33.587396] netdev_run_todo+0x683/0xae0 [ 33.591431] ? tun_xdp+0x410/0x410 [ 33.594943] ? register_netdev+0x30/0x30 [ 33.598975] ? refcount_inc+0x50/0x50 [ 33.602746] ? refcount_inc+0x50/0x50 [ 33.606521] ? sk_destruct+0x4c/0x80 [ 33.610204] ? __sk_free+0x5c/0x230 [ 33.613805] ? sk_free+0x2f/0x40 [ 33.617142] ? __tun_detach+0x760/0x1570 [ 33.621218] ? locks_remove_file+0x3fa/0x5a0 [ 33.625600] ? fcntl_setlk+0x10d0/0x10d0 [ 33.629641] ? fsnotify+0x1af0/0x1af0 [ 33.633421] ? __tun_detach+0x1570/0x1570 [ 33.637542] rtnl_unlock+0xe/0x10 [ 33.640966] tun_chr_close+0x49/0x60 [ 33.644652] __fput+0x333/0x7f0 [ 33.647909] ? fput+0x140/0x140 [ 33.651164] ? check_same_owner+0x320/0x320 [ 33.655456] ? _raw_spin_unlock_irq+0x27/0x70 [ 33.659928] ____fput+0x15/0x20 [ 33.663180] task_work_run+0x199/0x270 [ 33.667041] ? task_work_cancel+0x210/0x210 [ 33.671343] ? _raw_spin_unlock+0x22/0x30 [ 33.675462] ? switch_task_namespaces+0x87/0xc0 [ 33.680106] do_exit+0x9c8/0x1b00 [ 33.683537] ? mm_update_next_owner+0x930/0x930 [ 33.688179] ? find_held_lock+0x39/0x1d0 [ 33.692223] ? lock_downgrade+0x990/0x990 [ 33.696364] ? handle_mm_fault+0x410/0x8d0 [ 33.700568] ? __do_page_fault+0x31e/0xd60 [ 33.704774] ? __handle_mm_fault+0x39c0/0x39c0 [ 33.709324] ? vmacache_find+0x5f/0x280 [ 33.713279] ? up_read+0x1a/0x40 [ 33.716618] ? __do_page_fault+0x3d6/0xd60 [ 33.720842] ? mm_fault_error+0x2c0/0x2c0 [ 33.724963] ? do_vfs_ioctl+0x492/0x1530 [ 33.729005] ? do_page_fault+0xee/0x720 [ 33.732950] ? __do_page_fault+0xd60/0xd60 [ 33.737158] ? putname+0xf3/0x130 [ 33.740591] do_group_exit+0x149/0x400 [ 33.744451] ? lockdep_sys_exit+0x47/0xf0 [ 33.748568] ? SyS_exit+0x30/0x30 [ 33.751991] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 33.756980] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 33.761709] SyS_exit_group+0x1d/0x20 [ 33.765480] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.770204] RIP: 0033:0x443d58 [ 33.773364] RSP: 002b:00007ffe3253c928 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 33.781057] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443d58 [ 33.788308] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 33.795547] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd4 [ 33.802787] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 33.810027] R13: 00000000006d7180 R14: 0000000000000000 R15: 0000000000000000 [ 33.817289] [ 33.818890] Allocated by task 2983: [ 33.822491] save_stack+0x43/0xd0 [ 33.825912] kasan_kmalloc+0xad/0xe0 [ 33.829593] __kmalloc_node+0x47/0x70 [ 33.833373] kvmalloc_node+0x64/0xd0 [ 33.837062] alloc_netdev_mqs+0x16d/0xed0 [ 33.841186] __tun_chr_ioctl+0x1386/0x3e40 [ 33.845395] tun_chr_ioctl+0x2a/0x40 [ 33.849083] do_vfs_ioctl+0x1b1/0x1530 [ 33.853028] SyS_ioctl+0x8f/0xc0 [ 33.856364] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.861092] [ 33.862690] Freed by task 2983: [ 33.865949] save_stack+0x43/0xd0 [ 33.869371] kasan_slab_free+0x71/0xc0 [ 33.873226] kfree+0xca/0x250 [ 33.876301] kvfree+0x36/0x60 [ 33.879392] free_netdev+0x2cf/0x360 [ 33.883099] __tun_chr_ioctl+0x2df6/0x3e40 [ 33.887316] tun_chr_ioctl+0x2a/0x40 [ 33.891015] do_vfs_ioctl+0x1b1/0x1530 [ 33.894893] SyS_ioctl+0x8f/0xc0 [ 33.898243] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.902975] [ 33.904584] The buggy address belongs to the object at ffff8801cd838340 [ 33.904584] which belongs to the cache kmalloc-16384 of size 16384 [ 33.917563] The buggy address is located 13312 bytes inside of [ 33.917563] 16384-byte region [ffff8801cd838340, ffff8801cd83c340) [ 33.929755] The buggy address belongs to the page: [ 33.934661] page:ffffea0007360e00 count:1 mapcount:0 mapping:ffff8801cd838340 index:0x0 compound_mapcount: 0 [ 33.944622] flags: 0x200000000008100(slab|head) [ 33.949266] raw: 0200000000008100 ffff8801cd838340 0000000000000000 0000000100000001 [ 33.957129] raw: ffffea000733d220 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 33.964978] page dumped because: kasan: bad access detected [ 33.970659] [ 33.972258] Memory state around the buggy address: [ 33.977155] ffff8801cd83b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.984484] ffff8801cd83b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.991811] >ffff8801cd83b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.999140] ^ [ 34.004580] ffff8801cd83b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.011917] ffff8801cd83b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.019252] ================================================================== [ 34.026579] Disabling lock debugging due to kernel taint [ 34.031991] Kernel panic - not syncing: panic_on_warn set ... [ 34.031991] [ 34.039316] CPU: 1 PID: 2983 Comm: syzkaller526105 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 34.049155] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.058471] Call Trace: [ 34.061025] dump_stack+0x194/0x257 [ 34.064628] ? arch_local_irq_restore+0x53/0x53 [ 34.069274] ? vprintk_default+0x28/0x30 [ 34.073305] ? detach_if_pending+0x470/0x610 [ 34.077679] panic+0x1e4/0x41c [ 34.080837] ? refcount_error_report+0x214/0x214 [ 34.085572] ? detach_if_pending+0x557/0x610 [ 34.089947] kasan_end_report+0x50/0x50 [ 34.093886] kasan_report+0x144/0x340 [ 34.097655] __asan_report_store8_noabort+0x17/0x20 [ 34.102636] detach_if_pending+0x557/0x610 [ 34.106835] ? trace_raw_output_tick_stop+0x130/0x130 [ 34.111989] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 34.116626] ? lock_timer_base+0x1a3/0x2b0 [ 34.120824] ? lock_timer_base+0x1eb/0x2b0 [ 34.125027] ? __internal_add_timer+0x2d0/0x2d0 [ 34.129661] ? trace_hardirqs_on+0xd/0x10 [ 34.133778] try_to_del_timer_sync+0xa2/0x120 [ 34.138238] ? del_timer+0x130/0x130 [ 34.141918] ? del_timer_sync+0xeb/0x240 [ 34.145947] del_timer_sync+0x18a/0x240 [ 34.149889] tun_free_netdev+0x105/0x1b0 [ 34.153915] ? tun_xdp+0x410/0x410 [ 34.157422] ? cpumask_next+0x24/0x30 [ 34.161191] ? netdev_refcnt_read+0xed/0x150 [ 34.165567] netdev_run_todo+0x683/0xae0 [ 34.169594] ? tun_xdp+0x410/0x410 [ 34.173099] ? register_netdev+0x30/0x30 [ 34.177128] ? refcount_inc+0x50/0x50 [ 34.180890] ? refcount_inc+0x50/0x50 [ 34.184658] ? sk_destruct+0x4c/0x80 [ 34.188336] ? __sk_free+0x5c/0x230 [ 34.191929] ? sk_free+0x2f/0x40 [ 34.195258] ? __tun_detach+0x760/0x1570 [ 34.199295] ? locks_remove_file+0x3fa/0x5a0 [ 34.203669] ? fcntl_setlk+0x10d0/0x10d0 [ 34.207699] ? fsnotify+0x1af0/0x1af0 [ 34.211468] ? __tun_detach+0x1570/0x1570 [ 34.215582] rtnl_unlock+0xe/0x10 [ 34.218998] tun_chr_close+0x49/0x60 [ 34.222679] __fput+0x333/0x7f0 [ 34.225926] ? fput+0x140/0x140 [ 34.229173] ? check_same_owner+0x320/0x320 [ 34.233460] ? _raw_spin_unlock_irq+0x27/0x70 [ 34.237921] ____fput+0x15/0x20 [ 34.241182] task_work_run+0x199/0x270 [ 34.245039] ? task_work_cancel+0x210/0x210 [ 34.249329] ? _raw_spin_unlock+0x22/0x30 [ 34.253442] ? switch_task_namespaces+0x87/0xc0 [ 34.258080] do_exit+0x9c8/0x1b00 [ 34.261501] ? mm_update_next_owner+0x930/0x930 [ 34.266137] ? find_held_lock+0x39/0x1d0 [ 34.270167] ? lock_downgrade+0x990/0x990 [ 34.274293] ? handle_mm_fault+0x410/0x8d0 [ 34.278492] ? __do_page_fault+0x31e/0xd60 [ 34.282694] ? __handle_mm_fault+0x39c0/0x39c0 [ 34.287238] ? vmacache_find+0x5f/0x280 [ 34.291189] ? up_read+0x1a/0x40 [ 34.294524] ? __do_page_fault+0x3d6/0xd60 [ 34.298730] ? mm_fault_error+0x2c0/0x2c0 [ 34.302844] ? do_vfs_ioctl+0x492/0x1530 [ 34.306874] ? do_page_fault+0xee/0x720 [ 34.310813] ? __do_page_fault+0xd60/0xd60 [ 34.315016] ? putname+0xf3/0x130 [ 34.318437] do_group_exit+0x149/0x400 [ 34.322291] ? lockdep_sys_exit+0x47/0xf0 [ 34.326407] ? SyS_exit+0x30/0x30 [ 34.329829] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 34.334813] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 34.339537] SyS_exit_group+0x1d/0x20 [ 34.343303] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.348024] RIP: 0033:0x443d58 [ 34.351181] RSP: 002b:00007ffe3253c928 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 34.358855] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443d58 [ 34.366095] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 34.373332] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd4 [ 34.380567] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 34.387803] R13: 00000000006d7180 R14: 0000000000000000 R15: 0000000000000000