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-8,10.128.15.207' (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: [ 56.698293] ================================================================== [ 56.699405] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 56.700297] Write of size 8 at addr ffff8801ce783740 by task syzkaller289363/2982 [ 56.701309] [ 56.701546] CPU: 0 PID: 2982 Comm: syzkaller289363 Not tainted 4.14.0-rc4-next-20171009+ #33 [ 56.702705] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 56.703939] Call Trace: [ 56.704298] dump_stack+0x194/0x257 [ 56.704794] ? arch_local_irq_restore+0x53/0x53 [ 56.705419] ? show_regs_print_info+0x65/0x65 [ 56.706025] ? lock_timer_base+0x1a3/0x2b0 [ 56.706598] ? detach_if_pending+0x557/0x610 [ 56.707192] print_address_description+0x73/0x250 [ 56.707840] ? detach_if_pending+0x557/0x610 [ 56.708433] kasan_report+0x25b/0x340 [ 56.708969] __asan_report_store8_noabort+0x17/0x20 [ 56.709638] detach_if_pending+0x557/0x610 [ 56.710210] ? trace_raw_output_tick_stop+0x130/0x130 [ 56.710903] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 56.711530] ? lock_timer_base+0x1a3/0x2b0 [ 56.712101] ? lock_timer_base+0x1eb/0x2b0 [ 56.712675] ? __internal_add_timer+0x2d0/0x2d0 [ 56.713300] ? trace_hardirqs_on+0xd/0x10 [ 56.713935] try_to_del_timer_sync+0xa2/0x120 [ 56.714554] ? del_timer+0x130/0x130 [ 56.715058] ? del_timer_sync+0xeb/0x240 [ 56.715648] del_timer_sync+0x18a/0x240 [ 56.716190] tun_free_netdev+0x105/0x1b0 [ 56.716738] ? tun_xdp+0x410/0x410 [ 56.717215] ? cpumask_next+0x24/0x30 [ 56.717731] ? netdev_refcnt_read+0xed/0x150 [ 56.718331] netdev_run_todo+0x683/0xae0 [ 56.721859] ? tun_xdp+0x410/0x410 [ 56.725371] ? register_netdev+0x30/0x30 [ 56.729404] ? refcount_inc+0x50/0x50 [ 56.733174] ? refcount_inc+0x50/0x50 [ 56.736951] ? sk_destruct+0x4c/0x80 [ 56.740640] ? __sk_free+0x5c/0x230 [ 56.744245] ? sk_free+0x2f/0x40 [ 56.747586] ? __tun_detach+0x760/0x1570 [ 56.751642] ? locks_remove_file+0x3fa/0x5a0 [ 56.756023] ? fcntl_setlk+0x10d0/0x10d0 [ 56.760064] ? fsnotify+0x1af0/0x1af0 [ 56.763845] ? __tun_detach+0x1570/0x1570 [ 56.767963] rtnl_unlock+0xe/0x10 [ 56.771384] tun_chr_close+0x49/0x60 [ 56.775072] __fput+0x333/0x7f0 [ 56.778331] ? fput+0x140/0x140 [ 56.781582] ? check_same_owner+0x320/0x320 [ 56.785870] ? _raw_spin_unlock_irq+0x27/0x70 [ 56.790339] ____fput+0x15/0x20 [ 56.793588] task_work_run+0x199/0x270 [ 56.797448] ? task_work_cancel+0x210/0x210 [ 56.801740] ? _raw_spin_unlock+0x22/0x30 [ 56.805857] ? switch_task_namespaces+0x87/0xc0 [ 56.810499] do_exit+0x9c8/0x1b00 [ 56.813930] ? mm_update_next_owner+0x930/0x930 [ 56.818571] ? find_held_lock+0x39/0x1d0 [ 56.822612] ? lock_downgrade+0x990/0x990 [ 56.826752] ? handle_mm_fault+0x410/0x8d0 [ 56.830959] ? __do_page_fault+0x31e/0xd60 [ 56.835163] ? __handle_mm_fault+0x39c0/0x39c0 [ 56.839712] ? vmacache_find+0x5f/0x280 [ 56.843663] ? up_read+0x1a/0x40 [ 56.846997] ? __do_page_fault+0x3d6/0xd60 [ 56.851211] ? mm_fault_error+0x2c0/0x2c0 [ 56.855331] ? do_vfs_ioctl+0x492/0x1530 [ 56.859369] ? do_page_fault+0xee/0x720 [ 56.863313] ? __do_page_fault+0xd60/0xd60 [ 56.867523] ? putname+0xf3/0x130 [ 56.870952] do_group_exit+0x149/0x400 [ 56.874806] ? lockdep_sys_exit+0x47/0xf0 [ 56.878923] ? SyS_exit+0x30/0x30 [ 56.882350] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 56.887341] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 56.892071] SyS_exit_group+0x1d/0x20 [ 56.895842] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 56.900566] RIP: 0033:0x443678 [ 56.903726] RSP: 002b:00007ffca7b592e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 56.911404] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443678 [ 56.918645] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 56.925883] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 56.933120] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 56.940359] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000 [ 56.947616] [ 56.949212] Allocated by task 2982: [ 56.952808] save_stack+0x43/0xd0 [ 56.956228] kasan_kmalloc+0xad/0xe0 [ 56.959909] __kmalloc_node+0x47/0x70 [ 56.963679] kvmalloc_node+0x64/0xd0 [ 56.967749] alloc_netdev_mqs+0x16d/0xed0 [ 56.971868] __tun_chr_ioctl+0x1386/0x3e40 [ 56.976071] tun_chr_ioctl+0x2a/0x40 [ 56.979755] do_vfs_ioctl+0x1b1/0x1530 [ 56.983609] SyS_ioctl+0x8f/0xc0 [ 56.986946] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 56.991666] [ 56.993266] Freed by task 2982: [ 56.996518] save_stack+0x43/0xd0 [ 56.999938] kasan_slab_free+0x71/0xc0 [ 57.004054] kfree+0xca/0x250 [ 57.007129] kvfree+0x36/0x60 [ 57.010202] free_netdev+0x2cf/0x360 [ 57.013883] __tun_chr_ioctl+0x2df6/0x3e40 [ 57.018086] tun_chr_ioctl+0x2a/0x40 [ 57.021767] do_vfs_ioctl+0x1b1/0x1530 [ 57.025624] SyS_ioctl+0x8f/0xc0 [ 57.028962] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 57.033681] [ 57.035278] The buggy address belongs to the object at ffff8801ce780340 [ 57.035278] which belongs to the cache kmalloc-16384 of size 16384 [ 57.048250] The buggy address is located 13312 bytes inside of [ 57.048250] 16384-byte region [ffff8801ce780340, ffff8801ce784340) [ 57.060435] The buggy address belongs to the page: [ 57.065332] page:ffffea000739e000 count:1 mapcount:0 mapping:ffff8801ce780340 index:0x0 compound_mapcount: 0 [ 57.075275] flags: 0x200000000008100(slab|head) [ 57.079913] raw: 0200000000008100 ffff8801ce780340 0000000000000000 0000000100000001 [ 57.087760] raw: ffffea000738d620 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 57.095607] page dumped because: kasan: bad access detected [ 57.101283] [ 57.102878] Memory state around the buggy address: [ 57.107775] ffff8801ce783600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.115101] ffff8801ce783680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.122426] >ffff8801ce783700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.129752] ^ [ 57.135170] ffff8801ce783780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.142505] ffff8801ce783800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.149830] ================================================================== [ 57.157153] Disabling lock debugging due to kernel taint [ 57.162564] Kernel panic - not syncing: panic_on_warn set ... [ 57.162564] [ 57.169891] CPU: 0 PID: 2982 Comm: syzkaller289363 Tainted: G B 4.14.0-rc4-next-20171009+ #33 [ 57.179727] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.189041] Call Trace: [ 57.191594] dump_stack+0x194/0x257 [ 57.195188] ? arch_local_irq_restore+0x53/0x53 [ 57.199821] ? vprintk_default+0x28/0x30 [ 57.203846] ? detach_if_pending+0x470/0x610 [ 57.208220] panic+0x1e4/0x41c [ 57.211380] ? refcount_error_report+0x214/0x214 [ 57.216107] ? detach_if_pending+0x557/0x610 [ 57.220482] kasan_end_report+0x50/0x50 [ 57.224419] kasan_report+0x144/0x340 [ 57.228188] __asan_report_store8_noabort+0x17/0x20 [ 57.233168] detach_if_pending+0x557/0x610 [ 57.237371] ? trace_raw_output_tick_stop+0x130/0x130 [ 57.242532] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 57.247162] ? lock_timer_base+0x1a3/0x2b0 [ 57.251360] ? lock_timer_base+0x1eb/0x2b0 [ 57.255560] ? __internal_add_timer+0x2d0/0x2d0 [ 57.260192] ? trace_hardirqs_on+0xd/0x10 [ 57.264310] try_to_del_timer_sync+0xa2/0x120 [ 57.268768] ? del_timer+0x130/0x130 [ 57.272445] ? del_timer_sync+0xeb/0x240 [ 57.276475] del_timer_sync+0x18a/0x240 [ 57.280417] tun_free_netdev+0x105/0x1b0 [ 57.284442] ? tun_xdp+0x410/0x410 [ 57.287944] ? cpumask_next+0x24/0x30 [ 57.291710] ? netdev_refcnt_read+0xed/0x150 [ 57.296085] netdev_run_todo+0x683/0xae0 [ 57.300111] ? tun_xdp+0x410/0x410 [ 57.303614] ? register_netdev+0x30/0x30 [ 57.307647] ? refcount_inc+0x50/0x50 [ 57.311410] ? refcount_inc+0x50/0x50 [ 57.315178] ? sk_destruct+0x4c/0x80 [ 57.318857] ? __sk_free+0x5c/0x230 [ 57.322445] ? sk_free+0x2f/0x40 [ 57.325774] ? __tun_detach+0x760/0x1570 [ 57.329809] ? locks_remove_file+0x3fa/0x5a0 [ 57.334180] ? fcntl_setlk+0x10d0/0x10d0 [ 57.338209] ? fsnotify+0x1af0/0x1af0 [ 57.341976] ? __tun_detach+0x1570/0x1570 [ 57.346087] rtnl_unlock+0xe/0x10 [ 57.349504] tun_chr_close+0x49/0x60 [ 57.353183] __fput+0x333/0x7f0 [ 57.356433] ? fput+0x140/0x140 [ 57.359676] ? check_same_owner+0x320/0x320 [ 57.363960] ? _raw_spin_unlock_irq+0x27/0x70 [ 57.368421] ____fput+0x15/0x20 [ 57.371663] task_work_run+0x199/0x270 [ 57.375517] ? task_work_cancel+0x210/0x210 [ 57.379800] ? _raw_spin_unlock+0x22/0x30 [ 57.383911] ? switch_task_namespaces+0x87/0xc0 [ 57.388544] do_exit+0x9c8/0x1b00 [ 57.391963] ? mm_update_next_owner+0x930/0x930 [ 57.396599] ? find_held_lock+0x39/0x1d0 [ 57.400627] ? lock_downgrade+0x990/0x990 [ 57.404750] ? handle_mm_fault+0x410/0x8d0 [ 57.408948] ? __do_page_fault+0x31e/0xd60 [ 57.413146] ? __handle_mm_fault+0x39c0/0x39c0 [ 57.417689] ? vmacache_find+0x5f/0x280 [ 57.421630] ? up_read+0x1a/0x40 [ 57.424960] ? __do_page_fault+0x3d6/0xd60 [ 57.429163] ? mm_fault_error+0x2c0/0x2c0 [ 57.433274] ? do_vfs_ioctl+0x492/0x1530 [ 57.437303] ? do_page_fault+0xee/0x720 [ 57.441239] ? __do_page_fault+0xd60/0xd60 [ 57.445436] ? putname+0xf3/0x130 [ 57.448854] do_group_exit+0x149/0x400 [ 57.452703] ? lockdep_sys_exit+0x47/0xf0 [ 57.456811] ? SyS_exit+0x30/0x30 [ 57.460227] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 57.465206] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 57.469925] SyS_exit_group+0x1d/0x20 [ 57.473688] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 57.478407] RIP: 0033:0x443678 [ 57.481559] RSP: 002b:00007ffca7b592e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 57.489229] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443678 [ 57.496479] RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 [ 57.503721] RBP: 0000000000000082 R08: 00000000000000e7 R09: ffffffffffffffd0 [ 57.510955] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 57.518188] R13: 00000000006d6180 R14: 0000000000000000 R15: 0000000000000000