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-2,10.128.0.16' (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: [ 61.295326] ================================================================== [ 61.296545] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 61.297476] Write of size 8 at addr ffff8801ce13b780 by task syzkaller206221/2984 [ 61.298513] [ 61.298761] CPU: 1 PID: 2984 Comm: syzkaller206221 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 61.299910] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 61.301134] Call Trace: [ 61.301508] dump_stack+0x194/0x257 [ 61.302005] ? arch_local_irq_restore+0x53/0x53 [ 61.302662] ? show_regs_print_info+0x65/0x65 [ 61.303282] ? lock_timer_base+0x1a3/0x2b0 [ 61.303878] ? detach_if_pending+0x557/0x610 [ 61.304483] print_address_description+0x73/0x250 [ 61.305168] ? detach_if_pending+0x557/0x610 [ 61.305767] kasan_report+0x25b/0x340 [ 61.306290] __asan_report_store8_noabort+0x17/0x20 [ 61.306983] detach_if_pending+0x557/0x610 [ 61.307558] ? trace_raw_output_tick_stop+0x130/0x130 [ 61.308253] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 61.308878] ? lock_timer_base+0x1a3/0x2b0 [ 61.309455] ? lock_timer_base+0x1eb/0x2b0 [ 61.310041] ? __internal_add_timer+0x2d0/0x2d0 [ 61.310668] ? trace_hardirqs_on+0xd/0x10 [ 61.311237] try_to_del_timer_sync+0xa2/0x120 [ 61.311868] ? del_timer+0x130/0x130 [ 61.312383] ? del_timer_sync+0xeb/0x240 [ 61.312939] del_timer_sync+0x18a/0x240 [ 61.313494] tun_free_netdev+0x105/0x1b0 [ 61.314063] ? tun_xdp+0x410/0x410 [ 61.314568] ? cpumask_next+0x24/0x30 [ 61.315085] ? netdev_refcnt_read+0xed/0x150 [ 61.316322] netdev_run_todo+0x683/0xae0 [ 61.320379] ? tun_xdp+0x410/0x410 [ 61.323902] ? register_netdev+0x30/0x30 [ 61.327938] ? refcount_inc+0x50/0x50 [ 61.331719] ? refcount_inc+0x50/0x50 [ 61.335520] ? sk_destruct+0x4c/0x80 [ 61.339217] ? __sk_free+0x5c/0x230 [ 61.342820] ? sk_free+0x2f/0x40 [ 61.346160] ? __tun_detach+0x760/0x1570 [ 61.350222] ? locks_remove_file+0x3fa/0x5a0 [ 61.354609] ? fcntl_setlk+0x10d0/0x10d0 [ 61.358654] ? fsnotify+0x1af0/0x1af0 [ 61.362451] ? __tun_detach+0x1570/0x1570 [ 61.366580] rtnl_unlock+0xe/0x10 [ 61.370011] tun_chr_close+0x49/0x60 [ 61.373716] __fput+0x333/0x7f0 [ 61.376988] ? fput+0x140/0x140 [ 61.380246] ? check_same_owner+0x320/0x320 [ 61.384561] ____fput+0x15/0x20 [ 61.387825] task_work_run+0x199/0x270 [ 61.391690] ? task_work_cancel+0x210/0x210 [ 61.395985] ? free_nsproxy+0x185/0x1f0 [ 61.399936] ? switch_task_namespaces+0xa2/0xc0 [ 61.404586] do_exit+0x9c8/0x1b00 [ 61.408017] ? mm_update_next_owner+0x930/0x930 [ 61.412662] ? find_held_lock+0x39/0x1d0 [ 61.416705] ? lock_downgrade+0x990/0x990 [ 61.420845] ? handle_mm_fault+0x410/0x8d0 [ 61.425051] ? __do_page_fault+0x31e/0xd60 [ 61.429255] ? __handle_mm_fault+0x39c0/0x39c0 [ 61.434269] ? vmacache_find+0x5f/0x280 [ 61.438223] ? up_read+0x1a/0x40 [ 61.441563] ? __do_page_fault+0x3d6/0xd60 [ 61.447077] ? mm_fault_error+0x2c0/0x2c0 [ 61.451195] ? do_vfs_ioctl+0x492/0x1530 [ 61.455233] ? do_page_fault+0xee/0x720 [ 61.459177] ? __do_page_fault+0xd60/0xd60 [ 61.463386] ? putname+0xf3/0x130 [ 61.466816] do_group_exit+0x149/0x400 [ 61.470672] ? lockdep_sys_exit+0x47/0xf0 [ 61.474788] ? SyS_exit+0x30/0x30 [ 61.478210] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 61.483197] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 61.487927] SyS_exit_group+0x1d/0x20 [ 61.491700] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 61.496424] RIP: 0033:0x445149 [ 61.499582] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 61.507264] RAX: ffffffffffffffda RBX: 90e71030b3d5894a RCX: 0000000000445149 [ 61.514505] RDX: 0000000000445149 RSI: 0000000020927fd8 RDI: 0000000000000001 [ 61.521744] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 61.528985] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027a0 [ 61.536224] R13: 0000000000402830 R14: 0000000000000000 R15: 0000000000000000 [ 61.543483] [ 61.545081] Allocated by task 2984: [ 61.548680] save_stack+0x43/0xd0 [ 61.552105] kasan_kmalloc+0xad/0xe0 [ 61.555792] __kmalloc_node+0x47/0x70 [ 61.559566] kvmalloc_node+0x64/0xd0 [ 61.563251] alloc_netdev_mqs+0x16d/0xed0 [ 61.567373] __tun_chr_ioctl+0x1386/0x3e40 [ 61.571574] tun_chr_ioctl+0x2a/0x40 [ 61.575259] do_vfs_ioctl+0x1b1/0x1530 [ 61.579114] SyS_ioctl+0x8f/0xc0 [ 61.582450] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 61.587176] [ 61.588773] Freed by task 2984: [ 61.592025] save_stack+0x43/0xd0 [ 61.595448] kasan_slab_free+0x71/0xc0 [ 61.599323] kfree+0xca/0x250 [ 61.602396] kvfree+0x36/0x60 [ 61.605470] free_netdev+0x2cf/0x360 [ 61.609151] __tun_chr_ioctl+0x2df6/0x3e40 [ 61.613354] tun_chr_ioctl+0x2a/0x40 [ 61.617036] do_vfs_ioctl+0x1b1/0x1530 [ 61.620890] SyS_ioctl+0x8f/0xc0 [ 61.624223] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 61.628944] [ 61.630542] The buggy address belongs to the object at ffff8801ce138380 [ 61.630542] which belongs to the cache kmalloc-16384 of size 16384 [ 61.643512] The buggy address is located 13312 bytes inside of [ 61.643512] 16384-byte region [ffff8801ce138380, ffff8801ce13c380) [ 61.655699] The buggy address belongs to the page: [ 61.660595] page:ffffea0007384e00 count:1 mapcount:0 mapping:ffff8801ce138380 index:0x0 compound_mapcount: 0 [ 61.670539] flags: 0x200000000008100(slab|head) [ 61.675178] raw: 0200000000008100 ffff8801ce138380 0000000000000000 0000000100000001 [ 61.683027] raw: ffffea000736be20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 61.690899] page dumped because: kasan: bad access detected [ 61.696587] [ 61.698186] Memory state around the buggy address: [ 61.703085] ffff8801ce13b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 61.710414] ffff8801ce13b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 61.717744] >ffff8801ce13b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 61.725074] ^ [ 61.728408] ffff8801ce13b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 61.735735] ffff8801ce13b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 61.743061] ================================================================== [ 61.750384] Disabling lock debugging due to kernel taint [ 61.755797] Kernel panic - not syncing: panic_on_warn set ... [ 61.755797] [ 61.763125] CPU: 1 PID: 2984 Comm: syzkaller206221 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 61.772963] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 61.782283] Call Trace: [ 61.784842] dump_stack+0x194/0x257 [ 61.788436] ? arch_local_irq_restore+0x53/0x53 [ 61.793070] ? vprintk_default+0x28/0x30 [ 61.797098] ? detach_if_pending+0x470/0x610 [ 61.801473] panic+0x1e4/0x41c [ 61.804629] ? refcount_error_report+0x214/0x214 [ 61.809356] ? detach_if_pending+0x557/0x610 [ 61.813729] kasan_end_report+0x50/0x50 [ 61.817665] kasan_report+0x144/0x340 [ 61.821432] __asan_report_store8_noabort+0x17/0x20 [ 61.826411] detach_if_pending+0x557/0x610 [ 61.830612] ? trace_raw_output_tick_stop+0x130/0x130 [ 61.835771] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 61.840402] ? lock_timer_base+0x1a3/0x2b0 [ 61.844602] ? lock_timer_base+0x1eb/0x2b0 [ 61.848802] ? __internal_add_timer+0x2d0/0x2d0 [ 61.853451] ? trace_hardirqs_on+0xd/0x10 [ 61.857570] try_to_del_timer_sync+0xa2/0x120 [ 61.862029] ? del_timer+0x130/0x130 [ 61.865707] ? del_timer_sync+0xeb/0x240 [ 61.869735] del_timer_sync+0x18a/0x240 [ 61.873677] tun_free_netdev+0x105/0x1b0 [ 61.877705] ? tun_xdp+0x410/0x410 [ 61.881207] ? cpumask_next+0x24/0x30 [ 61.884974] ? netdev_refcnt_read+0xed/0x150 [ 61.889351] netdev_run_todo+0x683/0xae0 [ 61.893377] ? tun_xdp+0x410/0x410 [ 61.896881] ? register_netdev+0x30/0x30 [ 61.900906] ? refcount_inc+0x50/0x50 [ 61.904672] ? refcount_inc+0x50/0x50 [ 61.908438] ? sk_destruct+0x4c/0x80 [ 61.912115] ? __sk_free+0x5c/0x230 [ 61.915706] ? sk_free+0x2f/0x40 [ 61.919037] ? __tun_detach+0x760/0x1570 [ 61.923074] ? locks_remove_file+0x3fa/0x5a0 [ 61.927446] ? fcntl_setlk+0x10d0/0x10d0 [ 61.931476] ? fsnotify+0x1af0/0x1af0 [ 61.935243] ? __tun_detach+0x1570/0x1570 [ 61.939359] rtnl_unlock+0xe/0x10 [ 61.942775] tun_chr_close+0x49/0x60 [ 61.946454] __fput+0x333/0x7f0 [ 61.949703] ? fput+0x140/0x140 [ 61.952947] ? check_same_owner+0x320/0x320 [ 61.957241] ____fput+0x15/0x20 [ 61.960486] task_work_run+0x199/0x270 [ 61.964347] ? task_work_cancel+0x210/0x210 [ 61.968633] ? free_nsproxy+0x185/0x1f0 [ 61.972575] ? switch_task_namespaces+0xa2/0xc0 [ 61.977211] do_exit+0x9c8/0x1b00 [ 61.980632] ? mm_update_next_owner+0x930/0x930 [ 61.985267] ? find_held_lock+0x39/0x1d0 [ 61.989301] ? lock_downgrade+0x990/0x990 [ 61.993426] ? handle_mm_fault+0x410/0x8d0 [ 61.997627] ? __do_page_fault+0x31e/0xd60 [ 62.001843] ? __handle_mm_fault+0x39c0/0x39c0 [ 62.006394] ? vmacache_find+0x5f/0x280 [ 62.010341] ? up_read+0x1a/0x40 [ 62.013678] ? __do_page_fault+0x3d6/0xd60 [ 62.017885] ? mm_fault_error+0x2c0/0x2c0 [ 62.022006] ? do_vfs_ioctl+0x492/0x1530 [ 62.026042] ? do_page_fault+0xee/0x720 [ 62.029991] ? __do_page_fault+0xd60/0xd60 [ 62.034201] ? putname+0xf3/0x130 [ 62.037631] do_group_exit+0x149/0x400 [ 62.041485] ? lockdep_sys_exit+0x47/0xf0 [ 62.045605] ? SyS_exit+0x30/0x30 [ 62.049025] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 62.054008] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 62.058733] SyS_exit_group+0x1d/0x20 [ 62.062500] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 62.067218] RIP: 0033:0x445149 [ 62.070374] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 62.078044] RAX: ffffffffffffffda RBX: 90e71030b3d5894a RCX: 0000000000445149 [ 62.085280] RDX: 0000000000445149 RSI: 0000000020927fd8 RDI: 0000000000000001 [ 62.092514] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 62.099748] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027a0 [ 62.106981] R13: 0000000000402830 R14: 0000000000000000 R15: 0000000000000000