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-6,10.128.0.52' (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.196344] ================================================================== [ 41.197544] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 41.198544] Write of size 8 at addr ffff8801cd8bb7c0 by task syzkaller901131/2983 [ 41.199684] [ 41.199988] CPU: 1 PID: 2983 Comm: syzkaller901131 Not tainted 4.13.0-next-20170906+ #16 [ 41.201282] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.202603] Call Trace: [ 41.202966] dump_stack+0x194/0x257 [ 41.203462] ? arch_local_irq_restore+0x53/0x53 [ 41.204089] ? show_regs_print_info+0x65/0x65 [ 41.204763] ? lock_timer_base+0x1a3/0x2b0 [ 41.205350] ? detach_if_pending+0x557/0x610 [ 41.205943] print_address_description+0x73/0x250 [ 41.206627] ? detach_if_pending+0x557/0x610 [ 41.207281] kasan_report+0x24e/0x340 [ 41.207818] __asan_report_store8_noabort+0x17/0x20 [ 41.208555] detach_if_pending+0x557/0x610 [ 41.209127] ? trace_raw_output_tick_stop+0x130/0x130 [ 41.209860] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 41.210531] ? lock_timer_base+0x1a3/0x2b0 [ 41.211187] ? lock_timer_base+0x1eb/0x2b0 [ 41.211797] ? __internal_add_timer+0x2d0/0x2d0 [ 41.212447] ? trace_hardirqs_on+0xd/0x10 [ 41.213109] try_to_del_timer_sync+0xa2/0x120 [ 41.213812] ? del_timer+0x130/0x130 [ 41.214339] ? del_timer_sync+0xeb/0x240 [ 41.214927] del_timer_sync+0x18a/0x240 [ 41.215503] tun_free_netdev+0x105/0x1b0 [ 41.216051] ? tun_xdp+0x410/0x410 [ 41.217056] ? cpumask_next+0x24/0x30 [ 41.220837] ? netdev_refcnt_read+0xed/0x150 [ 41.225220] ? tun_xdp+0x410/0x410 [ 41.228731] netdev_run_todo+0x870/0xca0 [ 41.232764] ? do_group_exit+0x149/0x400 [ 41.236799] ? register_netdev+0x30/0x30 [ 41.240833] ? lock_downgrade+0x990/0x990 [ 41.244951] ? trace_hardirqs_on+0xd/0x10 [ 41.249086] ? refcount_sub_and_test+0x115/0x1b0 [ 41.253812] ? refcount_inc+0x50/0x50 [ 41.257585] ? refcount_inc+0x50/0x50 [ 41.261363] ? sk_destruct+0x4c/0x80 [ 41.265046] ? __sk_free+0x5c/0x230 [ 41.268643] ? sk_free+0x2f/0x40 [ 41.271990] ? __tun_detach+0x176/0x1390 [ 41.276032] ? tun_attach+0xf90/0xf90 [ 41.279817] ? do_raw_spin_trylock+0x190/0x190 [ 41.284374] ? locks_remove_file+0x3fa/0x5a0 [ 41.288760] ? fcntl_setlk+0x10d0/0x10d0 [ 41.292793] ? __fsnotify_parent+0xb4/0x3a0 [ 41.297087] ? fsnotify+0x1af0/0x1af0 [ 41.300875] ? __tun_detach+0x1390/0x1390 [ 41.305002] ? __tun_detach+0x1390/0x1390 [ 41.309140] rtnl_unlock+0xe/0x10 [ 41.312563] tun_chr_close+0x49/0x60 [ 41.316250] __fput+0x333/0x7f0 [ 41.319504] ? fput+0x140/0x140 [ 41.322765] ? check_same_owner+0x320/0x320 [ 41.327057] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.331535] ____fput+0x15/0x20 [ 41.334787] task_work_run+0x199/0x270 [ 41.338663] ? task_work_cancel+0x210/0x210 [ 41.342956] ? _raw_spin_unlock+0x22/0x30 [ 41.347084] ? switch_task_namespaces+0x87/0xc0 [ 41.351742] do_exit+0xa52/0x1b40 [ 41.355174] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.360169] ? check_noncircular+0x20/0x20 [ 41.364396] ? mm_update_next_owner+0x930/0x930 [ 41.369050] ? __pmd_alloc+0x4e0/0x4e0 [ 41.372926] ? find_held_lock+0x39/0x1d0 [ 41.376971] ? lock_downgrade+0x990/0x990 [ 41.381110] ? handle_mm_fault+0x4a2/0x860 [ 41.385322] ? down_read_trylock+0xdb/0x170 [ 41.389616] ? __handle_mm_fault+0x39c0/0x39c0 [ 41.394182] ? vmacache_find+0x61/0x270 [ 41.398133] ? up_read+0x1a/0x40 [ 41.401479] ? __do_page_fault+0x35b/0xb60 [ 41.405684] ? do_vfs_ioctl+0x492/0x1530 [ 41.409724] ? do_page_fault+0xee/0x720 [ 41.413671] ? __do_page_fault+0xb60/0xb60 [ 41.418135] ? putname+0xf3/0x130 [ 41.421567] do_group_exit+0x149/0x400 [ 41.425429] ? lockdep_sys_exit+0x47/0xf0 [ 41.429544] ? SyS_exit+0x30/0x30 [ 41.432968] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.437956] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 41.442686] SyS_exit_group+0x1d/0x20 [ 41.446474] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.451197] RIP: 0033:0x443c28 [ 41.454367] RSP: 002b:00007ffc53fdd258 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 41.462049] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443c28 [ 41.469289] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 41.476530] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd4 [ 41.483768] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 41.491008] R13: 00000000006d7180 R14: 0000000000000000 R15: 0000000000000000 [ 41.498264] [ 41.499918] Allocated by task 2983: [ 41.503516] save_stack_trace+0x16/0x20 [ 41.507488] save_stack+0x43/0xd0 [ 41.510927] kasan_kmalloc+0xad/0xe0 [ 41.514610] __kmalloc_node+0x47/0x70 [ 41.518381] kvmalloc_node+0x64/0xd0 [ 41.522081] alloc_netdev_mqs+0x16e/0xed0 [ 41.526228] __tun_chr_ioctl+0x12be/0x3d20 [ 41.530431] tun_chr_ioctl+0x2a/0x40 [ 41.534113] do_vfs_ioctl+0x1b1/0x1530 [ 41.537969] SyS_ioctl+0x8f/0xc0 [ 41.541321] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.546041] [ 41.547636] Freed by task 2983: [ 41.550901] save_stack_trace+0x16/0x20 [ 41.554846] save_stack+0x43/0xd0 [ 41.558268] kasan_slab_free+0x71/0xc0 [ 41.562137] kfree+0xca/0x250 [ 41.565227] kvfree+0x36/0x60 [ 41.568316] free_netdev+0x2cf/0x360 [ 41.571997] __tun_chr_ioctl+0x2cf6/0x3d20 [ 41.576203] tun_chr_ioctl+0x2a/0x40 [ 41.579884] do_vfs_ioctl+0x1b1/0x1530 [ 41.583739] SyS_ioctl+0x8f/0xc0 [ 41.587074] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.591794] [ 41.593394] The buggy address belongs to the object at ffff8801cd8b83c0 [ 41.593394] which belongs to the cache kmalloc-16384 of size 16384 [ 41.606365] The buggy address is located 13312 bytes inside of [ 41.606365] 16384-byte region [ffff8801cd8b83c0, ffff8801cd8bc3c0) [ 41.618554] The buggy address belongs to the page: [ 41.623488] page:ffffea0007362e00 count:1 mapcount:0 mapping:ffff8801cd8b83c0 index:0x0 compound_mapcount: 0 [ 41.633431] flags: 0x200000000008100(slab|head) [ 41.638070] raw: 0200000000008100 ffff8801cd8b83c0 0000000000000000 0000000100000001 [ 41.645920] raw: ffffea000735b820 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 41.653775] page dumped because: kasan: bad access detected [ 41.659450] [ 41.661048] Memory state around the buggy address: [ 41.665944] ffff8801cd8bb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.673292] ffff8801cd8bb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.680654] >ffff8801cd8bb780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.687981] ^ [ 41.693398] ffff8801cd8bb800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.700726] ffff8801cd8bb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.708053] ================================================================== [ 41.715380] Disabling lock debugging due to kernel taint [ 41.720794] Kernel panic - not syncing: panic_on_warn set ... [ 41.720794] [ 41.728120] CPU: 1 PID: 2983 Comm: syzkaller901131 Tainted: G B 4.13.0-next-20170906+ #16 [ 41.737523] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.746840] Call Trace: [ 41.749393] dump_stack+0x194/0x257 [ 41.752990] ? arch_local_irq_restore+0x53/0x53 [ 41.757632] ? vprintk_default+0x28/0x30 [ 41.761659] ? detach_if_pending+0x530/0x610 [ 41.766032] panic+0x1e4/0x417 [ 41.769220] ? __warn+0x1d9/0x1d9 [ 41.772643] ? detach_if_pending+0x557/0x610 [ 41.777014] kasan_end_report+0x50/0x50 [ 41.780951] kasan_report+0x137/0x340 [ 41.784715] __asan_report_store8_noabort+0x17/0x20 [ 41.789695] detach_if_pending+0x557/0x610 [ 41.793905] ? trace_raw_output_tick_stop+0x130/0x130 [ 41.799059] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 41.803707] ? lock_timer_base+0x1a3/0x2b0 [ 41.807905] ? lock_timer_base+0x1eb/0x2b0 [ 41.812106] ? __internal_add_timer+0x2d0/0x2d0 [ 41.816740] ? trace_hardirqs_on+0xd/0x10 [ 41.820855] try_to_del_timer_sync+0xa2/0x120 [ 41.825314] ? del_timer+0x130/0x130 [ 41.829003] ? del_timer_sync+0xeb/0x240 [ 41.833032] del_timer_sync+0x18a/0x240 [ 41.836972] tun_free_netdev+0x105/0x1b0 [ 41.840996] ? tun_xdp+0x410/0x410 [ 41.844498] ? cpumask_next+0x24/0x30 [ 41.848263] ? netdev_refcnt_read+0xed/0x150 [ 41.852635] ? tun_xdp+0x410/0x410 [ 41.856139] netdev_run_todo+0x870/0xca0 [ 41.860169] ? do_group_exit+0x149/0x400 [ 41.864196] ? register_netdev+0x30/0x30 [ 41.868224] ? lock_downgrade+0x990/0x990 [ 41.872347] ? trace_hardirqs_on+0xd/0x10 [ 41.876468] ? refcount_sub_and_test+0x115/0x1b0 [ 41.881195] ? refcount_inc+0x50/0x50 [ 41.884960] ? refcount_inc+0x50/0x50 [ 41.888738] ? sk_destruct+0x4c/0x80 [ 41.892413] ? __sk_free+0x5c/0x230 [ 41.896002] ? sk_free+0x2f/0x40 [ 41.899333] ? __tun_detach+0x176/0x1390 [ 41.903364] ? tun_attach+0xf90/0xf90 [ 41.907132] ? do_raw_spin_trylock+0x190/0x190 [ 41.911686] ? locks_remove_file+0x3fa/0x5a0 [ 41.916061] ? fcntl_setlk+0x10d0/0x10d0 [ 41.920087] ? __fsnotify_parent+0xb4/0x3a0 [ 41.924381] ? fsnotify+0x1af0/0x1af0 [ 41.928151] ? __tun_detach+0x1390/0x1390 [ 41.932263] ? __tun_detach+0x1390/0x1390 [ 41.936379] rtnl_unlock+0xe/0x10 [ 41.939799] tun_chr_close+0x49/0x60 [ 41.943479] __fput+0x333/0x7f0 [ 41.946725] ? fput+0x140/0x140 [ 41.949973] ? check_same_owner+0x320/0x320 [ 41.954270] ? _raw_spin_unlock_irq+0x27/0x70 [ 41.958747] ____fput+0x15/0x20 [ 41.962006] task_work_run+0x199/0x270 [ 41.965859] ? task_work_cancel+0x210/0x210 [ 41.970158] ? _raw_spin_unlock+0x22/0x30 [ 41.974288] ? switch_task_namespaces+0x87/0xc0 [ 41.978929] do_exit+0xa52/0x1b40 [ 41.982354] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.987349] ? check_noncircular+0x20/0x20 [ 41.991549] ? mm_update_next_owner+0x930/0x930 [ 41.996198] ? __pmd_alloc+0x4e0/0x4e0 [ 42.000055] ? find_held_lock+0x39/0x1d0 [ 42.004086] ? lock_downgrade+0x990/0x990 [ 42.008208] ? handle_mm_fault+0x4a2/0x860 [ 42.012406] ? down_read_trylock+0xdb/0x170 [ 42.016693] ? __handle_mm_fault+0x39c0/0x39c0 [ 42.021242] ? vmacache_find+0x61/0x270 [ 42.025207] ? up_read+0x1a/0x40 [ 42.028541] ? __do_page_fault+0x35b/0xb60 [ 42.032740] ? do_vfs_ioctl+0x492/0x1530 [ 42.036769] ? do_page_fault+0xee/0x720 [ 42.040708] ? __do_page_fault+0xb60/0xb60 [ 42.044906] ? putname+0xf3/0x130 [ 42.048327] do_group_exit+0x149/0x400 [ 42.052182] ? lockdep_sys_exit+0x47/0xf0 [ 42.056294] ? SyS_exit+0x30/0x30 [ 42.059708] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.064690] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 42.069408] SyS_exit_group+0x1d/0x20 [ 42.073181] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 42.077902] RIP: 0033:0x443c28 [ 42.081072] RSP: 002b:00007ffc53fdd258 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 42.088744] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443c28 [ 42.095977] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 42.103210] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd4 [ 42.110443] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 42.117677] R13: 00000000006d7180 R14: 0000000000000000 R15: 0000000000000000