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-5,10.128.0.47' (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: [ 46.126319] ================================================================== [ 46.127490] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 46.128384] Write of size 8 at addr ffff8801ce8a3780 by task syzkaller358670/2984 [ 46.129384] [ 46.129620] CPU: 0 PID: 2984 Comm: syzkaller358670 Not tainted 4.13.0-next-20170912+ #20 [ 46.130699] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.131934] Call Trace: [ 46.132297] dump_stack+0x194/0x257 [ 46.132793] ? arch_local_irq_restore+0x53/0x53 [ 46.133419] ? show_regs_print_info+0x65/0x65 [ 46.134082] ? lock_timer_base+0x1a3/0x2b0 [ 46.134654] ? detach_if_pending+0x557/0x610 [ 46.135267] print_address_description+0x73/0x250 [ 46.135965] ? detach_if_pending+0x557/0x610 [ 46.136581] kasan_report+0x24e/0x340 [ 46.137101] __asan_report_store8_noabort+0x17/0x20 [ 46.137772] detach_if_pending+0x557/0x610 [ 46.138370] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.139082] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.139705] ? lock_timer_base+0x1a3/0x2b0 [ 46.140378] ? lock_timer_base+0x1eb/0x2b0 [ 46.140953] ? __internal_add_timer+0x2d0/0x2d0 [ 46.141581] ? trace_hardirqs_on+0xd/0x10 [ 46.142180] try_to_del_timer_sync+0xa2/0x120 [ 46.142784] ? del_timer+0x130/0x130 [ 46.143290] ? del_timer_sync+0xeb/0x240 [ 46.143858] del_timer_sync+0x18a/0x240 [ 46.144399] tun_free_netdev+0x105/0x1b0 [ 46.144949] ? tun_xdp+0x410/0x410 [ 46.145430] ? cpumask_next+0x24/0x30 [ 46.145959] ? netdev_refcnt_read+0xed/0x150 [ 46.146822] ? tun_xdp+0x410/0x410 [ 46.150335] netdev_run_todo+0x870/0xca0 [ 46.154371] ? do_group_exit+0x149/0x400 [ 46.158410] ? register_netdev+0x30/0x30 [ 46.162446] ? lock_downgrade+0x990/0x990 [ 46.166578] ? trace_hardirqs_on+0xd/0x10 [ 46.170718] ? refcount_sub_and_test+0x115/0x1b0 [ 46.175458] ? refcount_inc+0x50/0x50 [ 46.179241] ? refcount_inc+0x50/0x50 [ 46.183020] ? sk_destruct+0x4c/0x80 [ 46.186706] ? __sk_free+0x5c/0x230 [ 46.190308] ? sk_free+0x2f/0x40 [ 46.193644] ? __tun_detach+0x176/0x1390 [ 46.197691] ? tun_attach+0xf90/0xf90 [ 46.201485] ? locks_remove_file+0x3fa/0x5a0 [ 46.205868] ? fcntl_setlk+0x10d0/0x10d0 [ 46.209906] ? __fsnotify_parent+0xb4/0x3a0 [ 46.214205] ? fsnotify+0x1af0/0x1af0 [ 46.217983] ? __tun_detach+0x1390/0x1390 [ 46.222113] ? __tun_detach+0x1390/0x1390 [ 46.226234] rtnl_unlock+0xe/0x10 [ 46.229659] tun_chr_close+0x49/0x60 [ 46.233346] __fput+0x333/0x7f0 [ 46.236606] ? fput+0x140/0x140 [ 46.239864] ? check_same_owner+0x320/0x320 [ 46.244180] ____fput+0x15/0x20 [ 46.247434] task_work_run+0x199/0x270 [ 46.251296] ? task_work_cancel+0x210/0x210 [ 46.255603] ? free_nsproxy+0x185/0x1f0 [ 46.259552] ? switch_task_namespaces+0xa2/0xc0 [ 46.264208] do_exit+0xa52/0x1b40 [ 46.267635] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.272627] ? check_noncircular+0x20/0x20 [ 46.276854] ? mm_update_next_owner+0x930/0x930 [ 46.281499] ? __pmd_alloc+0x4e0/0x4e0 [ 46.285371] ? find_held_lock+0x39/0x1d0 [ 46.289418] ? lock_downgrade+0x990/0x990 [ 46.293571] ? handle_mm_fault+0x410/0x8d0 [ 46.297778] ? down_read_trylock+0xdb/0x170 [ 46.302084] ? __handle_mm_fault+0x39c0/0x39c0 [ 46.306640] ? vmacache_find+0x61/0x270 [ 46.310597] ? vmacache_update+0xfe/0x130 [ 46.314727] ? up_read+0x1a/0x40 [ 46.318069] ? __do_page_fault+0x35b/0xb60 [ 46.322275] ? do_vfs_ioctl+0x492/0x1530 [ 46.326328] ? do_page_fault+0xee/0x720 [ 46.330277] ? __do_page_fault+0xb60/0xb60 [ 46.334494] ? putname+0xf3/0x130 [ 46.337938] do_group_exit+0x149/0x400 [ 46.341806] ? lockdep_sys_exit+0x47/0xf0 [ 46.345928] ? SyS_exit+0x30/0x30 [ 46.349375] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.354376] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.359107] SyS_exit_group+0x1d/0x20 [ 46.362884] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.367611] RIP: 0033:0x445129 [ 46.370773] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 46.378455] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445129 [ 46.385703] RDX: 0000000000445129 RSI: 0000000020fbcfd8 RDI: 0000000000000001 [ 46.392947] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 46.400189] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000402780 [ 46.407518] R13: 0000000000402810 R14: 0000000000000000 R15: 0000000000000000 [ 46.414778] [ 46.416378] Allocated by task 2984: [ 46.419977] save_stack_trace+0x16/0x20 [ 46.423923] save_stack+0x43/0xd0 [ 46.427347] kasan_kmalloc+0xad/0xe0 [ 46.431033] __kmalloc_node+0x47/0x70 [ 46.434813] kvmalloc_node+0x64/0xd0 [ 46.438500] alloc_netdev_mqs+0x16e/0xed0 [ 46.442628] __tun_chr_ioctl+0x12be/0x3d20 [ 46.446833] tun_chr_ioctl+0x2a/0x40 [ 46.450517] do_vfs_ioctl+0x1b1/0x1530 [ 46.454384] SyS_ioctl+0x8f/0xc0 [ 46.457723] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.462448] [ 46.464056] Freed by task 2984: [ 46.467307] save_stack_trace+0x16/0x20 [ 46.471252] save_stack+0x43/0xd0 [ 46.474676] kasan_slab_free+0x71/0xc0 [ 46.478533] kfree+0xca/0x250 [ 46.481608] kvfree+0x36/0x60 [ 46.484688] free_netdev+0x2cf/0x360 [ 46.488372] __tun_chr_ioctl+0x2cf6/0x3d20 [ 46.492576] tun_chr_ioctl+0x2a/0x40 [ 46.496274] do_vfs_ioctl+0x1b1/0x1530 [ 46.500145] SyS_ioctl+0x8f/0xc0 [ 46.503499] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.508223] [ 46.509825] The buggy address belongs to the object at ffff8801ce8a0380 [ 46.509825] which belongs to the cache kmalloc-16384 of size 16384 [ 46.522799] The buggy address is located 13312 bytes inside of [ 46.522799] 16384-byte region [ffff8801ce8a0380, ffff8801ce8a4380) [ 46.534989] The buggy address belongs to the page: [ 46.539904] page:ffffea00073a2800 count:1 mapcount:0 mapping:ffff8801ce8a0380 index:0x0 compound_mapcount: 0 [ 46.549850] flags: 0x200000000008100(slab|head) [ 46.554491] raw: 0200000000008100 ffff8801ce8a0380 0000000000000000 0000000100000001 [ 46.562346] raw: ffffea0007374220 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 46.570205] page dumped because: kasan: bad access detected [ 46.575883] [ 46.577481] Memory state around the buggy address: [ 46.582380] ffff8801ce8a3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.589715] ffff8801ce8a3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.597048] >ffff8801ce8a3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.604378] ^ [ 46.607716] ffff8801ce8a3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.615047] ffff8801ce8a3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.622375] ================================================================== [ 46.629703] Disabling lock debugging due to kernel taint [ 46.635118] Kernel panic - not syncing: panic_on_warn set ... [ 46.635118] [ 46.642444] CPU: 0 PID: 2984 Comm: syzkaller358670 Tainted: G B 4.13.0-next-20170912+ #20 [ 46.651867] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.661187] Call Trace: [ 46.663741] dump_stack+0x194/0x257 [ 46.667877] ? arch_local_irq_restore+0x53/0x53 [ 46.672514] ? vprintk_default+0x28/0x30 [ 46.676543] ? detach_if_pending+0x4c0/0x610 [ 46.680919] panic+0x1e4/0x417 [ 46.684079] ? __warn+0x1d9/0x1d9 [ 46.687514] ? detach_if_pending+0x557/0x610 [ 46.691889] kasan_end_report+0x50/0x50 [ 46.695828] kasan_report+0x137/0x340 [ 46.699597] __asan_report_store8_noabort+0x17/0x20 [ 46.704576] detach_if_pending+0x557/0x610 [ 46.708789] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.713946] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.718578] ? lock_timer_base+0x1a3/0x2b0 [ 46.722777] ? lock_timer_base+0x1eb/0x2b0 [ 46.726983] ? __internal_add_timer+0x2d0/0x2d0 [ 46.731618] ? trace_hardirqs_on+0xd/0x10 [ 46.735737] try_to_del_timer_sync+0xa2/0x120 [ 46.740197] ? del_timer+0x130/0x130 [ 46.743876] ? del_timer_sync+0xeb/0x240 [ 46.747906] del_timer_sync+0x18a/0x240 [ 46.751849] tun_free_netdev+0x105/0x1b0 [ 46.755875] ? tun_xdp+0x410/0x410 [ 46.759380] ? cpumask_next+0x24/0x30 [ 46.763147] ? netdev_refcnt_read+0xed/0x150 [ 46.767524] ? tun_xdp+0x410/0x410 [ 46.771030] netdev_run_todo+0x870/0xca0 [ 46.775060] ? do_group_exit+0x149/0x400 [ 46.779098] ? register_netdev+0x30/0x30 [ 46.783127] ? lock_downgrade+0x990/0x990 [ 46.787238] ? trace_hardirqs_on+0xd/0x10 [ 46.791360] ? refcount_sub_and_test+0x115/0x1b0 [ 46.796081] ? refcount_inc+0x50/0x50 [ 46.799847] ? refcount_inc+0x50/0x50 [ 46.803614] ? sk_destruct+0x4c/0x80 [ 46.807290] ? __sk_free+0x5c/0x230 [ 46.810882] ? sk_free+0x2f/0x40 [ 46.814214] ? __tun_detach+0x176/0x1390 [ 46.818247] ? tun_attach+0xf90/0xf90 [ 46.822018] ? locks_remove_file+0x3fa/0x5a0 [ 46.826391] ? fcntl_setlk+0x10d0/0x10d0 [ 46.830418] ? __fsnotify_parent+0xb4/0x3a0 [ 46.834707] ? fsnotify+0x1af0/0x1af0 [ 46.838475] ? __tun_detach+0x1390/0x1390 [ 46.842587] ? __tun_detach+0x1390/0x1390 [ 46.846703] rtnl_unlock+0xe/0x10 [ 46.850119] tun_chr_close+0x49/0x60 [ 46.853800] __fput+0x333/0x7f0 [ 46.857047] ? fput+0x140/0x140 [ 46.860302] ? check_same_owner+0x320/0x320 [ 46.864593] ____fput+0x15/0x20 [ 46.867838] task_work_run+0x199/0x270 [ 46.871695] ? task_work_cancel+0x210/0x210 [ 46.875984] ? free_nsproxy+0x185/0x1f0 [ 46.879926] ? switch_task_namespaces+0xa2/0xc0 [ 46.884563] do_exit+0xa52/0x1b40 [ 46.887985] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.892987] ? check_noncircular+0x20/0x20 [ 46.897202] ? mm_update_next_owner+0x930/0x930 [ 46.901838] ? __pmd_alloc+0x4e0/0x4e0 [ 46.905696] ? find_held_lock+0x39/0x1d0 [ 46.909731] ? lock_downgrade+0x990/0x990 [ 46.913865] ? handle_mm_fault+0x410/0x8d0 [ 46.918064] ? down_read_trylock+0xdb/0x170 [ 46.922360] ? __handle_mm_fault+0x39c0/0x39c0 [ 46.926908] ? vmacache_find+0x61/0x270 [ 46.930848] ? vmacache_update+0xfe/0x130 [ 46.934964] ? up_read+0x1a/0x40 [ 46.938295] ? __do_page_fault+0x35b/0xb60 [ 46.942514] ? do_vfs_ioctl+0x492/0x1530 [ 46.946544] ? do_page_fault+0xee/0x720 [ 46.950484] ? __do_page_fault+0xb60/0xb60 [ 46.954682] ? putname+0xf3/0x130 [ 46.958103] do_group_exit+0x149/0x400 [ 46.961956] ? lockdep_sys_exit+0x47/0xf0 [ 46.966069] ? SyS_exit+0x30/0x30 [ 46.969498] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.974481] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.979212] SyS_exit_group+0x1d/0x20 [ 46.982981] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.987700] RIP: 0033:0x445129 [ 46.990858] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 46.998539] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445129 [ 47.005786] RDX: 0000000000445129 RSI: 0000000020fbcfd8 RDI: 0000000000000001 [ 47.013022] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 47.020257] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000402780 [ 47.027492] R13: 0000000000402810 R14: 0000000000000000 R15: 0000000000000000 [ 47.034769] Dumping ftrace buffer: [ 47.038274] (ftrace buffer empty) [ 47.041952] Kernel Offset: disabled [ 47.045548] Rebooting in 86400 seconds..