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.15.219' (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.897534] ================================================================== [ 46.904965] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 46.911692] Write of size 8 at addr ffff8801c0a6b7c0 by task syzkaller462674/2981 [ 46.919280] [ 46.920882] CPU: 0 PID: 2981 Comm: syzkaller462674 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 46.929424] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.938748] Call Trace: [ 46.941309] dump_stack+0x194/0x257 [ 46.944911] ? arch_local_irq_restore+0x53/0x53 [ 46.949549] ? show_regs_print_info+0x65/0x65 [ 46.954023] ? lock_timer_base+0x1a3/0x2b0 [ 46.958232] ? detach_if_pending+0x557/0x610 [ 46.962614] print_address_description+0x73/0x250 [ 46.967434] ? detach_if_pending+0x557/0x610 [ 46.971816] kasan_report+0x25b/0x340 [ 46.975592] __asan_report_store8_noabort+0x17/0x20 [ 46.980578] detach_if_pending+0x557/0x610 [ 46.984785] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.989949] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.994589] ? lock_timer_base+0x1a3/0x2b0 [ 46.998799] ? lock_timer_base+0x1eb/0x2b0 [ 47.003009] ? __internal_add_timer+0x2d0/0x2d0 [ 47.007648] ? trace_hardirqs_on+0xd/0x10 [ 47.011774] try_to_del_timer_sync+0xa2/0x120 [ 47.016240] ? del_timer+0x130/0x130 [ 47.019926] ? del_timer_sync+0xeb/0x240 [ 47.023966] del_timer_sync+0x18a/0x240 [ 47.027916] tun_free_netdev+0x105/0x1b0 [ 47.031946] ? tun_xdp+0x410/0x410 [ 47.035456] ? cpumask_next+0x24/0x30 [ 47.039228] ? netdev_refcnt_read+0xed/0x150 [ 47.043612] netdev_run_todo+0x683/0xae0 [ 47.047645] ? tun_xdp+0x410/0x410 [ 47.051156] ? register_netdev+0x30/0x30 [ 47.055190] ? refcount_inc+0x50/0x50 [ 47.058971] ? refcount_inc+0x50/0x50 [ 47.062750] ? sk_destruct+0x4c/0x80 [ 47.066433] ? __sk_free+0x5c/0x230 [ 47.070034] ? sk_free+0x2f/0x40 [ 47.073375] ? __tun_detach+0x760/0x1570 [ 47.077430] ? locks_remove_file+0x3fa/0x5a0 [ 47.081808] ? fcntl_setlk+0x10d0/0x10d0 [ 47.085850] ? fsnotify+0x1af0/0x1af0 [ 47.089632] ? __tun_detach+0x1570/0x1570 [ 47.093750] rtnl_unlock+0xe/0x10 [ 47.097173] tun_chr_close+0x49/0x60 [ 47.100858] __fput+0x333/0x7f0 [ 47.104115] ? fput+0x140/0x140 [ 47.107366] ? check_same_owner+0x320/0x320 [ 47.111665] ____fput+0x15/0x20 [ 47.114915] task_work_run+0x199/0x270 [ 47.118775] ? task_work_cancel+0x210/0x210 [ 47.123068] ? free_nsproxy+0x185/0x1f0 [ 47.127013] ? switch_task_namespaces+0xa2/0xc0 [ 47.131660] do_exit+0x9c8/0x1b00 [ 47.135090] ? mm_update_next_owner+0x930/0x930 [ 47.139730] ? find_held_lock+0x39/0x1d0 [ 47.143771] ? lock_downgrade+0x990/0x990 [ 47.147912] ? handle_mm_fault+0x410/0x8d0 [ 47.152117] ? __do_page_fault+0x31e/0xd60 [ 47.156322] ? __handle_mm_fault+0x39c0/0x39c0 [ 47.160871] ? vmacache_find+0x5f/0x280 [ 47.164823] ? up_read+0x1a/0x40 [ 47.168158] ? __do_page_fault+0x3d6/0xd60 [ 47.172371] ? mm_fault_error+0x2c0/0x2c0 [ 47.176489] ? do_vfs_ioctl+0x492/0x1530 [ 47.180528] ? do_page_fault+0xee/0x720 [ 47.184474] ? __do_page_fault+0xd60/0xd60 [ 47.188678] ? putname+0xf3/0x130 [ 47.192109] do_group_exit+0x149/0x400 [ 47.195965] ? lockdep_sys_exit+0x47/0xf0 [ 47.200082] ? SyS_exit+0x30/0x30 [ 47.203509] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.208496] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 47.213225] SyS_exit_group+0x1d/0x20 [ 47.216997] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 47.221727] RIP: 0033:0x445169 [ 47.224885] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 47.233014] RAX: ffffffffffffffda RBX: bdc3ab50d565110b RCX: 0000000000445169 [ 47.240254] RDX: 0000000000445169 RSI: 000000002023f000 RDI: 0000000000000001 [ 47.247491] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 47.254731] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027c0 [ 47.261968] R13: 0000000000402850 R14: 0000000000000000 R15: 0000000000000000 [ 47.269227] [ 47.270826] Allocated by task 2981: [ 47.274426] save_stack+0x43/0xd0 [ 47.277846] kasan_kmalloc+0xad/0xe0 [ 47.281526] __kmalloc_node+0x47/0x70 [ 47.285293] kvmalloc_node+0x64/0xd0 [ 47.288974] alloc_netdev_mqs+0x16d/0xed0 [ 47.293093] __tun_chr_ioctl+0x1386/0x3e40 [ 47.297294] tun_chr_ioctl+0x2a/0x40 [ 47.300977] do_vfs_ioctl+0x1b1/0x1530 [ 47.304833] SyS_ioctl+0x8f/0xc0 [ 47.308168] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 47.312889] [ 47.314484] Freed by task 2981: [ 47.317730] save_stack+0x43/0xd0 [ 47.321149] kasan_slab_free+0x71/0xc0 [ 47.325002] kfree+0xca/0x250 [ 47.328078] kvfree+0x36/0x60 [ 47.331152] free_netdev+0x2cf/0x360 [ 47.334833] __tun_chr_ioctl+0x2df6/0x3e40 [ 47.339035] tun_chr_ioctl+0x2a/0x40 [ 47.342717] do_vfs_ioctl+0x1b1/0x1530 [ 47.346573] SyS_ioctl+0x8f/0xc0 [ 47.349906] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 47.354628] [ 47.356224] The buggy address belongs to the object at ffff8801c0a683c0 [ 47.356224] which belongs to the cache kmalloc-16384 of size 16384 [ 47.369196] The buggy address is located 13312 bytes inside of [ 47.369196] 16384-byte region [ffff8801c0a683c0, ffff8801c0a6c3c0) [ 47.381382] The buggy address belongs to the page: [ 47.386280] page:ffffea0007029a00 count:1 mapcount:0 mapping:ffff8801c0a683c0 index:0x0 compound_mapcount: 0 [ 47.396225] flags: 0x200000000008100(slab|head) [ 47.400864] raw: 0200000000008100 ffff8801c0a683c0 0000000000000000 0000000100000001 [ 47.408712] raw: ffffea0007025e20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 47.416557] page dumped because: kasan: bad access detected [ 47.422233] [ 47.423828] Memory state around the buggy address: [ 47.428724] ffff8801c0a6b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.436050] ffff8801c0a6b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.443376] >ffff8801c0a6b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.450702] ^ [ 47.456132] ffff8801c0a6b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.463468] ffff8801c0a6b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 47.470794] ================================================================== [ 47.478117] Disabling lock debugging due to kernel taint [ 47.483529] Kernel panic - not syncing: panic_on_warn set ... [ 47.483529] [ 47.490854] CPU: 0 PID: 2981 Comm: syzkaller462674 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 47.500693] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.510009] Call Trace: [ 47.512562] dump_stack+0x194/0x257 [ 47.516154] ? arch_local_irq_restore+0x53/0x53 [ 47.520787] ? vprintk_default+0x28/0x30 [ 47.524814] ? detach_if_pending+0x470/0x610 [ 47.529187] panic+0x1e4/0x41c [ 47.532343] ? refcount_error_report+0x214/0x214 [ 47.537069] ? detach_if_pending+0x557/0x610 [ 47.541442] kasan_end_report+0x50/0x50 [ 47.545378] kasan_report+0x144/0x340 [ 47.549143] __asan_report_store8_noabort+0x17/0x20 [ 47.554120] detach_if_pending+0x557/0x610 [ 47.558320] ? trace_raw_output_tick_stop+0x130/0x130 [ 47.563473] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 47.568103] ? lock_timer_base+0x1a3/0x2b0 [ 47.572302] ? lock_timer_base+0x1eb/0x2b0 [ 47.576507] ? __internal_add_timer+0x2d0/0x2d0 [ 47.581143] ? trace_hardirqs_on+0xd/0x10 [ 47.585256] try_to_del_timer_sync+0xa2/0x120 [ 47.589715] ? del_timer+0x130/0x130 [ 47.593391] ? del_timer_sync+0xeb/0x240 [ 47.597419] del_timer_sync+0x18a/0x240 [ 47.601362] tun_free_netdev+0x105/0x1b0 [ 47.605387] ? tun_xdp+0x410/0x410 [ 47.608889] ? cpumask_next+0x24/0x30 [ 47.612657] ? netdev_refcnt_read+0xed/0x150 [ 47.617123] netdev_run_todo+0x683/0xae0 [ 47.621152] ? tun_xdp+0x410/0x410 [ 47.624655] ? register_netdev+0x30/0x30 [ 47.628678] ? refcount_inc+0x50/0x50 [ 47.632440] ? refcount_inc+0x50/0x50 [ 47.636205] ? sk_destruct+0x4c/0x80 [ 47.639880] ? __sk_free+0x5c/0x230 [ 47.643469] ? sk_free+0x2f/0x40 [ 47.646797] ? __tun_detach+0x760/0x1570 [ 47.650833] ? locks_remove_file+0x3fa/0x5a0 [ 47.655206] ? fcntl_setlk+0x10d0/0x10d0 [ 47.659235] ? fsnotify+0x1af0/0x1af0 [ 47.663002] ? __tun_detach+0x1570/0x1570 [ 47.667112] rtnl_unlock+0xe/0x10 [ 47.670530] tun_chr_close+0x49/0x60 [ 47.674207] __fput+0x333/0x7f0 [ 47.677453] ? fput+0x140/0x140 [ 47.680698] ? check_same_owner+0x320/0x320 [ 47.684987] ____fput+0x15/0x20 [ 47.688229] task_work_run+0x199/0x270 [ 47.692081] ? task_work_cancel+0x210/0x210 [ 47.696368] ? free_nsproxy+0x185/0x1f0 [ 47.700305] ? switch_task_namespaces+0xa2/0xc0 [ 47.704939] do_exit+0x9c8/0x1b00 [ 47.708359] ? mm_update_next_owner+0x930/0x930 [ 47.712992] ? find_held_lock+0x39/0x1d0 [ 47.717022] ? lock_downgrade+0x990/0x990 [ 47.721144] ? handle_mm_fault+0x410/0x8d0 [ 47.725342] ? __do_page_fault+0x31e/0xd60 [ 47.729540] ? __handle_mm_fault+0x39c0/0x39c0 [ 47.734082] ? vmacache_find+0x5f/0x280 [ 47.738025] ? up_read+0x1a/0x40 [ 47.741353] ? __do_page_fault+0x3d6/0xd60 [ 47.745554] ? mm_fault_error+0x2c0/0x2c0 [ 47.749667] ? do_vfs_ioctl+0x492/0x1530 [ 47.753697] ? do_page_fault+0xee/0x720 [ 47.757635] ? __do_page_fault+0xd60/0xd60 [ 47.761834] ? putname+0xf3/0x130 [ 47.765255] do_group_exit+0x149/0x400 [ 47.769107] ? lockdep_sys_exit+0x47/0xf0 [ 47.773218] ? SyS_exit+0x30/0x30 [ 47.776633] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.781614] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 47.786335] SyS_exit_group+0x1d/0x20 [ 47.790099] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 47.794814] RIP: 0033:0x445169 [ 47.797970] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 47.805641] RAX: ffffffffffffffda RBX: bdc3ab50d565110b RCX: 0000000000445169 [ 47.812875] RDX: 0000000000445169 RSI: 000000002023f000 RDI: 0000000000000001 [ 47.820108] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 47.827339] R10: 0000000000000000 R11: 0000000000000206 R12: 00000000004027c0 [ 47.834572] R13: 0000000000402850 R14: 0000000000000000 R15: 0000000000000000