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-0,10.128.15.234' (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: [ 22.194519] ================================================================== [ 22.195643] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 22.196574] Write of size 8 at addr ffff8801ce953780 by task syzkaller815851/2977 [ 22.197628] [ 22.197884] CPU: 1 PID: 2977 Comm: syzkaller815851 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 22.199038] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.200294] Call Trace: [ 22.200680] dump_stack+0x194/0x257 [ 22.201203] ? arch_local_irq_restore+0x53/0x53 [ 22.201851] ? show_regs_print_info+0x65/0x65 [ 22.202478] ? lock_timer_base+0x1a3/0x2b0 [ 22.203075] ? detach_if_pending+0x557/0x610 [ 22.203709] print_address_description+0x73/0x250 [ 22.204399] ? detach_if_pending+0x557/0x610 [ 22.205014] kasan_report+0x25b/0x340 [ 22.205578] __asan_report_store8_noabort+0x17/0x20 [ 22.206300] detach_if_pending+0x557/0x610 [ 22.206896] ? trace_raw_output_tick_stop+0x130/0x130 [ 22.207615] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 22.208306] ? lock_timer_base+0x1a3/0x2b0 [ 22.208899] ? lock_timer_base+0x1eb/0x2b0 [ 22.209498] ? __internal_add_timer+0x2d0/0x2d0 [ 22.210143] ? trace_hardirqs_on+0xd/0x10 [ 22.210739] try_to_del_timer_sync+0xa2/0x120 [ 22.211378] ? del_timer+0x130/0x130 [ 22.211908] ? del_timer_sync+0xeb/0x240 [ 22.212506] del_timer_sync+0x18a/0x240 [ 22.213071] tun_free_netdev+0x105/0x1b0 [ 22.213656] ? tun_xdp+0x410/0x410 [ 22.214161] ? cpumask_next+0x24/0x30 [ 22.214698] ? netdev_refcnt_read+0xed/0x150 [ 22.219115] netdev_run_todo+0x683/0xae0 [ 22.223179] ? tun_xdp+0x410/0x410 [ 22.226713] ? register_netdev+0x30/0x30 [ 22.230768] ? refcount_inc+0x50/0x50 [ 22.234557] ? refcount_inc+0x50/0x50 [ 22.238355] ? sk_destruct+0x4c/0x80 [ 22.242057] ? __sk_free+0x5c/0x230 [ 22.245675] ? sk_free+0x2f/0x40 [ 22.249033] ? __tun_detach+0x760/0x1570 [ 22.253127] ? locks_remove_file+0x3fa/0x5a0 [ 22.257536] ? fcntl_setlk+0x10d0/0x10d0 [ 22.261602] ? fsnotify+0x1af0/0x1af0 [ 22.265411] ? __tun_detach+0x1570/0x1570 [ 22.269547] rtnl_unlock+0xe/0x10 [ 22.272979] tun_chr_close+0x49/0x60 [ 22.276668] __fput+0x333/0x7f0 [ 22.279931] ? fput+0x140/0x140 [ 22.283191] ? check_same_owner+0x320/0x320 [ 22.287488] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.291970] ____fput+0x15/0x20 [ 22.295224] task_work_run+0x199/0x270 [ 22.299094] ? task_work_cancel+0x210/0x210 [ 22.303390] ? _raw_spin_unlock+0x22/0x30 [ 22.307515] ? switch_task_namespaces+0x87/0xc0 [ 22.312166] do_exit+0x9c8/0x1b00 [ 22.315606] ? mm_update_next_owner+0x930/0x930 [ 22.320250] ? find_held_lock+0x39/0x1d0 [ 22.324301] ? lock_downgrade+0x990/0x990 [ 22.328461] ? handle_mm_fault+0x410/0x8d0 [ 22.332670] ? __do_page_fault+0x31e/0xd60 [ 22.336879] ? __handle_mm_fault+0x39c0/0x39c0 [ 22.341434] ? vmacache_find+0x5f/0x280 [ 22.345394] ? up_read+0x1a/0x40 [ 22.348737] ? __do_page_fault+0x3d6/0xd60 [ 22.352958] ? mm_fault_error+0x2c0/0x2c0 [ 22.357083] ? do_vfs_ioctl+0x492/0x1530 [ 22.361132] ? do_page_fault+0xee/0x720 [ 22.365085] ? __do_page_fault+0xd60/0xd60 [ 22.369295] ? putname+0xf3/0x130 [ 22.372732] do_group_exit+0x149/0x400 [ 22.376593] ? lockdep_sys_exit+0x47/0xf0 [ 22.380715] ? SyS_exit+0x30/0x30 [ 22.384147] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.389143] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.393878] SyS_exit_group+0x1d/0x20 [ 22.397654] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.402381] RIP: 0033:0x443688 [ 22.405544] RSP: 002b:00007ffe71876938 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.413228] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443688 [ 22.420471] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 22.427717] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 22.434959] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 22.442203] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 22.449472] [ 22.451077] Allocated by task 2977: [ 22.454681] save_stack+0x43/0xd0 [ 22.458106] kasan_kmalloc+0xad/0xe0 [ 22.461792] __kmalloc_node+0x47/0x70 [ 22.465566] kvmalloc_node+0x64/0xd0 [ 22.469252] alloc_netdev_mqs+0x16d/0xed0 [ 22.473372] __tun_chr_ioctl+0x1386/0x3e40 [ 22.477578] tun_chr_ioctl+0x2a/0x40 [ 22.481266] do_vfs_ioctl+0x1b1/0x1530 [ 22.485125] SyS_ioctl+0x8f/0xc0 [ 22.488466] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.493193] [ 22.494792] Freed by task 2977: [ 22.498044] save_stack+0x43/0xd0 [ 22.501471] kasan_slab_free+0x71/0xc0 [ 22.505328] kfree+0xca/0x250 [ 22.508407] kvfree+0x36/0x60 [ 22.511485] free_netdev+0x2cf/0x360 [ 22.515174] __tun_chr_ioctl+0x2df6/0x3e40 [ 22.519380] tun_chr_ioctl+0x2a/0x40 [ 22.523065] do_vfs_ioctl+0x1b1/0x1530 [ 22.526923] SyS_ioctl+0x8f/0xc0 [ 22.530260] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.534985] [ 22.536589] The buggy address belongs to the object at ffff8801ce950380 [ 22.536589] which belongs to the cache kmalloc-16384 of size 16384 [ 22.549563] The buggy address is located 13312 bytes inside of [ 22.549563] 16384-byte region [ffff8801ce950380, ffff8801ce954380) [ 22.561761] The buggy address belongs to the page: [ 22.566661] page:ffffea00073a5400 count:1 mapcount:0 mapping:ffff8801ce950380 index:0x0 compound_mapcount: 0 [ 22.576612] flags: 0x200000000008100(slab|head) [ 22.581256] raw: 0200000000008100 ffff8801ce950380 0000000000000000 0000000100000001 [ 22.589110] raw: ffffea00073a5c20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 22.596962] page dumped because: kasan: bad access detected [ 22.602642] [ 22.604242] Memory state around the buggy address: [ 22.609145] ffff8801ce953680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.616475] ffff8801ce953700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.623805] >ffff8801ce953780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.631133] ^ [ 22.634470] ffff8801ce953800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.641800] ffff8801ce953880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.649129] ================================================================== [ 22.656456] Disabling lock debugging due to kernel taint [ 22.661868] Kernel panic - not syncing: panic_on_warn set ... [ 22.661868] [ 22.669197] CPU: 1 PID: 2977 Comm: syzkaller815851 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 22.679035] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 22.688351] Call Trace: [ 22.690907] dump_stack+0x194/0x257 [ 22.694502] ? arch_local_irq_restore+0x53/0x53 [ 22.699138] ? vprintk_default+0x28/0x30 [ 22.703170] ? detach_if_pending+0x470/0x610 [ 22.707547] panic+0x1e4/0x41c [ 22.710706] ? refcount_error_report+0x214/0x214 [ 22.715438] ? detach_if_pending+0x557/0x610 [ 22.719812] kasan_end_report+0x50/0x50 [ 22.723752] kasan_report+0x144/0x340 [ 22.727521] __asan_report_store8_noabort+0x17/0x20 [ 22.732503] detach_if_pending+0x557/0x610 [ 22.736704] ? trace_raw_output_tick_stop+0x130/0x130 [ 22.741861] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 22.746494] ? lock_timer_base+0x1a3/0x2b0 [ 22.750693] ? lock_timer_base+0x1eb/0x2b0 [ 22.754895] ? __internal_add_timer+0x2d0/0x2d0 [ 22.759531] ? trace_hardirqs_on+0xd/0x10 [ 22.763655] try_to_del_timer_sync+0xa2/0x120 [ 22.768119] ? del_timer+0x130/0x130 [ 22.771800] ? del_timer_sync+0xeb/0x240 [ 22.775831] del_timer_sync+0x18a/0x240 [ 22.779775] tun_free_netdev+0x105/0x1b0 [ 22.783802] ? tun_xdp+0x410/0x410 [ 22.787306] ? cpumask_next+0x24/0x30 [ 22.791074] ? netdev_refcnt_read+0xed/0x150 [ 22.795453] netdev_run_todo+0x683/0xae0 [ 22.799484] ? tun_xdp+0x410/0x410 [ 22.802991] ? register_netdev+0x30/0x30 [ 22.807018] ? refcount_inc+0x50/0x50 [ 22.810787] ? refcount_inc+0x50/0x50 [ 22.814557] ? sk_destruct+0x4c/0x80 [ 22.818237] ? __sk_free+0x5c/0x230 [ 22.821830] ? sk_free+0x2f/0x40 [ 22.825165] ? __tun_detach+0x760/0x1570 [ 22.829210] ? locks_remove_file+0x3fa/0x5a0 [ 22.833587] ? fcntl_setlk+0x10d0/0x10d0 [ 22.837621] ? fsnotify+0x1af0/0x1af0 [ 22.841393] ? __tun_detach+0x1570/0x1570 [ 22.845506] rtnl_unlock+0xe/0x10 [ 22.848923] tun_chr_close+0x49/0x60 [ 22.852605] __fput+0x333/0x7f0 [ 22.855854] ? fput+0x140/0x140 [ 22.859103] ? check_same_owner+0x320/0x320 [ 22.863391] ? _raw_spin_unlock_irq+0x27/0x70 [ 22.867856] ____fput+0x15/0x20 [ 22.871104] task_work_run+0x199/0x270 [ 22.874959] ? task_work_cancel+0x210/0x210 [ 22.879247] ? _raw_spin_unlock+0x22/0x30 [ 22.883364] ? switch_task_namespaces+0x87/0xc0 [ 22.888001] do_exit+0x9c8/0x1b00 [ 22.891425] ? mm_update_next_owner+0x930/0x930 [ 22.896060] ? find_held_lock+0x39/0x1d0 [ 22.900096] ? lock_downgrade+0x990/0x990 [ 22.904227] ? handle_mm_fault+0x410/0x8d0 [ 22.908426] ? __do_page_fault+0x31e/0xd60 [ 22.912629] ? __handle_mm_fault+0x39c0/0x39c0 [ 22.917174] ? vmacache_find+0x5f/0x280 [ 22.921119] ? up_read+0x1a/0x40 [ 22.924462] ? __do_page_fault+0x3d6/0xd60 [ 22.928676] ? mm_fault_error+0x2c0/0x2c0 [ 22.932791] ? do_vfs_ioctl+0x492/0x1530 [ 22.936826] ? do_page_fault+0xee/0x720 [ 22.940769] ? __do_page_fault+0xd60/0xd60 [ 22.944969] ? putname+0xf3/0x130 [ 22.948394] do_group_exit+0x149/0x400 [ 22.952248] ? lockdep_sys_exit+0x47/0xf0 [ 22.956363] ? SyS_exit+0x30/0x30 [ 22.959781] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.964767] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 22.969491] SyS_exit_group+0x1d/0x20 [ 22.973259] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.977978] RIP: 0033:0x443688 [ 22.981135] RSP: 002b:00007ffe71876938 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 22.988808] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443688 [ 22.996061] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 23.003302] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 23.010748] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 23.017985] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000