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-kasan-gce-5,10.128.15.213' (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.396449] ================================================================== [ 46.397720] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 46.398611] Write of size 8 at addr ffff8801d1223678 by task syzkaller050765/2990 [ 46.399607] [ 46.399839] CPU: 0 PID: 2990 Comm: syzkaller050765 Not tainted 4.14.0-rc5+ #141 [ 46.400830] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.402074] Call Trace: [ 46.402432] dump_stack+0x194/0x257 [ 46.402923] ? arch_local_irq_restore+0x53/0x53 [ 46.403545] ? show_regs_print_info+0x65/0x65 [ 46.404147] ? lock_timer_base+0x1a3/0x2b0 [ 46.404714] ? detach_if_pending+0x557/0x610 [ 46.405304] print_address_description+0x73/0x250 [ 46.405947] ? detach_if_pending+0x557/0x610 [ 46.406539] kasan_report+0x25b/0x340 [ 46.407054] __asan_report_store8_noabort+0x17/0x20 [ 46.407719] detach_if_pending+0x557/0x610 [ 46.408288] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.408979] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.409599] ? lock_timer_base+0x1a3/0x2b0 [ 46.410166] ? lock_timer_base+0x1eb/0x2b0 [ 46.410736] ? __internal_add_timer+0x2d0/0x2d0 [ 46.411359] ? lock_downgrade+0x990/0x990 [ 46.411914] ? trace_hardirqs_on+0xd/0x10 [ 46.412474] try_to_del_timer_sync+0xa2/0x120 [ 46.413073] ? del_timer+0x130/0x130 [ 46.413573] ? del_timer_sync+0xeb/0x240 [ 46.414125] del_timer_sync+0x18a/0x240 [ 46.414661] tun_free_netdev+0x105/0x1b0 [ 46.415208] ? tun_xdp+0x410/0x410 [ 46.415682] ? cpumask_next+0x24/0x30 [ 46.416195] ? netdev_refcnt_read+0xed/0x150 [ 46.416788] ? tun_xdp+0x410/0x410 [ 46.420296] netdev_run_todo+0x870/0xca0 [ 46.424327] ? do_group_exit+0x149/0x400 [ 46.428358] ? mark_held_locks+0xaf/0x100 [ 46.432475] ? register_netdev+0x30/0x30 [ 46.436505] ? find_held_lock+0x35/0x1d0 [ 46.440541] ? lock_downgrade+0x990/0x990 [ 46.444660] ? refcount_sub_and_test+0x115/0x1b0 [ 46.449383] ? refcount_inc+0x50/0x50 [ 46.453155] ? refcount_inc+0x50/0x50 [ 46.456930] ? sk_destruct+0x4c/0x80 [ 46.460610] ? __sk_free+0x5c/0x230 [ 46.464203] ? sk_free+0x2f/0x40 [ 46.467538] ? __tun_detach+0x176/0x1390 [ 46.471583] ? tun_attach+0xfa0/0xfa0 [ 46.475361] ? locks_remove_file+0x3fa/0x5a0 [ 46.479736] ? fcntl_setlk+0x10c0/0x10c0 [ 46.483765] ? __fsnotify_parent+0xb4/0x3a0 [ 46.488055] ? fsnotify+0x1af0/0x1af0 [ 46.491828] ? __tun_detach+0x1390/0x1390 [ 46.495947] rtnl_unlock+0xe/0x10 [ 46.499366] tun_chr_close+0x49/0x60 [ 46.503052] __fput+0x327/0x7e0 [ 46.506306] ? fput+0x140/0x140 [ 46.509553] ? check_same_owner+0x320/0x320 [ 46.513848] ____fput+0x15/0x20 [ 46.517093] task_work_run+0x199/0x270 [ 46.520954] ? task_work_cancel+0x210/0x210 [ 46.525242] ? free_nsproxy+0x185/0x1f0 [ 46.529182] ? switch_task_namespaces+0xa2/0xc0 [ 46.533822] do_exit+0x9b5/0x1ad0 [ 46.537241] ? kvfree+0x3b/0x60 [ 46.540490] ? mm_update_next_owner+0x930/0x930 [ 46.545125] ? find_held_lock+0x35/0x1d0 [ 46.549159] ? handle_mm_fault+0x248/0x8d0 [ 46.553375] ? find_held_lock+0x35/0x1d0 [ 46.557414] ? __do_page_fault+0x64c/0xd60 [ 46.561620] ? lock_downgrade+0x990/0x990 [ 46.565741] ? handle_mm_fault+0x410/0x8d0 [ 46.569944] ? __do_page_fault+0x31e/0xd60 [ 46.574146] ? __handle_mm_fault+0x39c0/0x39c0 [ 46.578695] ? vmacache_find+0x5f/0x280 [ 46.582644] ? up_read+0x1a/0x40 [ 46.585982] ? __do_page_fault+0x3d6/0xd60 [ 46.590195] ? mm_fault_error+0x2c0/0x2c0 [ 46.594312] ? do_vfs_ioctl+0x486/0x1520 [ 46.598348] ? do_page_fault+0xee/0x720 [ 46.602290] ? __do_page_fault+0xd60/0xd60 [ 46.606493] ? putname+0xf3/0x130 [ 46.609920] do_group_exit+0x149/0x400 [ 46.613779] ? SyS_exit+0x30/0x30 [ 46.617199] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.622184] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.626909] SyS_exit_group+0x1d/0x20 [ 46.630681] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.635402] RIP: 0033:0x444e09 [ 46.638557] RSP: 002b:00007ffce99d3d68 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 46.646229] RAX: ffffffffffffffda RBX: 00007ffce99d3db0 RCX: 0000000000444e09 [ 46.653463] RDX: 0000000000444e09 RSI: 0000000020c4c000 RDI: 0000000000000001 [ 46.660697] RBP: 0000000000000082 R08: 0000000000000000 R09: 00007ffce99d3db0 [ 46.667934] R10: 0000000000000000 R11: 0000000000000202 R12: 00000000004021b0 [ 46.675169] R13: 0000000000402240 R14: 0000000000000000 R15: 0000000000000000 [ 46.682425] [ 46.684019] Allocated by task 2990: [ 46.687613] save_stack_trace+0x16/0x20 [ 46.691551] save_stack+0x43/0xd0 [ 46.694967] kasan_kmalloc+0xad/0xe0 [ 46.698645] __kmalloc_node+0x47/0x70 [ 46.702411] kvmalloc_node+0x64/0xd0 [ 46.706091] alloc_netdev_mqs+0x16e/0xed0 [ 46.710201] __tun_chr_ioctl+0x12b2/0x3d20 [ 46.714398] tun_chr_ioctl+0x2a/0x40 [ 46.718076] do_vfs_ioctl+0x1b1/0x1520 [ 46.721930] SyS_ioctl+0x8f/0xc0 [ 46.725264] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.729982] [ 46.731575] Freed by task 2990: [ 46.734839] save_stack_trace+0x16/0x20 [ 46.738777] save_stack+0x43/0xd0 [ 46.742192] kasan_slab_free+0x71/0xc0 [ 46.746042] kfree+0xca/0x250 [ 46.749114] kvfree+0x36/0x60 [ 46.752184] free_netdev+0x2cf/0x360 [ 46.755862] __tun_chr_ioctl+0x2cea/0x3d20 [ 46.760059] tun_chr_ioctl+0x2a/0x40 [ 46.763743] do_vfs_ioctl+0x1b1/0x1520 [ 46.767596] SyS_ioctl+0x8f/0xc0 [ 46.770931] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.775649] [ 46.777245] The buggy address belongs to the object at ffff8801d1220340 [ 46.777245] which belongs to the cache kmalloc-16384 of size 16384 [ 46.790211] The buggy address is located 13112 bytes inside of [ 46.790211] 16384-byte region [ffff8801d1220340, ffff8801d1224340) [ 46.802392] The buggy address belongs to the page: [ 46.807288] page:ffffea0007448800 count:1 mapcount:0 mapping:ffff8801d1220340 index:0x0 compound_mapcount: 0 [ 46.817220] flags: 0x200000000008100(slab|head) [ 46.821854] raw: 0200000000008100 ffff8801d1220340 0000000000000000 0000000100000001 [ 46.829698] raw: ffffea000744d620 ffff8801dac01c48 ffff8801dac02200 0000000000000000 [ 46.837545] page dumped because: kasan: bad access detected [ 46.843220] [ 46.844812] Memory state around the buggy address: [ 46.849705] ffff8801d1223500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.857034] ffff8801d1223580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.864357] >ffff8801d1223600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.871677] ^ [ 46.878916] ffff8801d1223680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.886240] ffff8801d1223700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.893559] ================================================================== [ 46.900882] Disabling lock debugging due to kernel taint [ 46.906296] Kernel panic - not syncing: panic_on_warn set ... [ 46.906296] [ 46.913802] CPU: 0 PID: 2990 Comm: syzkaller050765 Tainted: G B 4.14.0-rc5+ #141 [ 46.922437] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.931759] Call Trace: [ 46.934315] dump_stack+0x194/0x257 [ 46.937911] ? arch_local_irq_restore+0x53/0x53 [ 46.942543] ? kasan_end_report+0x32/0x50 [ 46.946656] ? lock_downgrade+0x990/0x990 [ 46.950770] ? detach_if_pending+0x540/0x610 [ 46.955144] panic+0x1e4/0x417 [ 46.958299] ? __warn+0x1d9/0x1d9 [ 46.961721] ? detach_if_pending+0x557/0x610 [ 46.966093] kasan_end_report+0x50/0x50 [ 46.970030] kasan_report+0x144/0x340 [ 46.973795] __asan_report_store8_noabort+0x17/0x20 [ 46.978772] detach_if_pending+0x557/0x610 [ 46.982970] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.988128] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.992759] ? lock_timer_base+0x1a3/0x2b0 [ 46.996965] ? lock_timer_base+0x1eb/0x2b0 [ 47.001164] ? __internal_add_timer+0x2d0/0x2d0 [ 47.005797] ? lock_downgrade+0x990/0x990 [ 47.009911] ? trace_hardirqs_on+0xd/0x10 [ 47.014024] try_to_del_timer_sync+0xa2/0x120 [ 47.018482] ? del_timer+0x130/0x130 [ 47.022163] ? del_timer_sync+0xeb/0x240 [ 47.026194] del_timer_sync+0x18a/0x240 [ 47.030135] tun_free_netdev+0x105/0x1b0 [ 47.034161] ? tun_xdp+0x410/0x410 [ 47.037667] ? cpumask_next+0x24/0x30 [ 47.041433] ? netdev_refcnt_read+0xed/0x150 [ 47.045809] ? tun_xdp+0x410/0x410 [ 47.049312] netdev_run_todo+0x870/0xca0 [ 47.053337] ? do_group_exit+0x149/0x400 [ 47.057363] ? mark_held_locks+0xaf/0x100 [ 47.061472] ? register_netdev+0x30/0x30 [ 47.065497] ? find_held_lock+0x35/0x1d0 [ 47.069526] ? lock_downgrade+0x990/0x990 [ 47.073727] ? refcount_sub_and_test+0x115/0x1b0 [ 47.078445] ? refcount_inc+0x50/0x50 [ 47.082208] ? refcount_inc+0x50/0x50 [ 47.085976] ? sk_destruct+0x4c/0x80 [ 47.089742] ? __sk_free+0x5c/0x230 [ 47.093332] ? sk_free+0x2f/0x40 [ 47.096661] ? __tun_detach+0x176/0x1390 [ 47.100690] ? tun_attach+0xfa0/0xfa0 [ 47.104462] ? locks_remove_file+0x3fa/0x5a0 [ 47.108851] ? fcntl_setlk+0x10c0/0x10c0 [ 47.112879] ? __fsnotify_parent+0xb4/0x3a0 [ 47.117169] ? fsnotify+0x1af0/0x1af0 [ 47.120943] ? __tun_detach+0x1390/0x1390 [ 47.125058] rtnl_unlock+0xe/0x10 [ 47.128474] tun_chr_close+0x49/0x60 [ 47.132154] __fput+0x327/0x7e0 [ 47.135399] ? fput+0x140/0x140 [ 47.138645] ? check_same_owner+0x320/0x320 [ 47.142935] ____fput+0x15/0x20 [ 47.146178] task_work_run+0x199/0x270 [ 47.150031] ? task_work_cancel+0x210/0x210 [ 47.154316] ? free_nsproxy+0x185/0x1f0 [ 47.158255] ? switch_task_namespaces+0xa2/0xc0 [ 47.162892] do_exit+0x9b5/0x1ad0 [ 47.166310] ? kvfree+0x3b/0x60 [ 47.169556] ? mm_update_next_owner+0x930/0x930 [ 47.174187] ? find_held_lock+0x35/0x1d0 [ 47.178221] ? handle_mm_fault+0x248/0x8d0 [ 47.182420] ? find_held_lock+0x35/0x1d0 [ 47.186629] ? __do_page_fault+0x64c/0xd60 [ 47.190830] ? lock_downgrade+0x990/0x990 [ 47.194945] ? handle_mm_fault+0x410/0x8d0 [ 47.199143] ? __do_page_fault+0x31e/0xd60 [ 47.203343] ? __handle_mm_fault+0x39c0/0x39c0 [ 47.207894] ? vmacache_find+0x5f/0x280 [ 47.211836] ? up_read+0x1a/0x40 [ 47.215168] ? __do_page_fault+0x3d6/0xd60 [ 47.219368] ? mm_fault_error+0x2c0/0x2c0 [ 47.223481] ? do_vfs_ioctl+0x486/0x1520 [ 47.227509] ? do_page_fault+0xee/0x720 [ 47.231446] ? __do_page_fault+0xd60/0xd60 [ 47.235643] ? putname+0xf3/0x130 [ 47.239062] do_group_exit+0x149/0x400 [ 47.242913] ? SyS_exit+0x30/0x30 [ 47.246331] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.251313] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 47.256035] SyS_exit_group+0x1d/0x20 [ 47.259801] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 47.264518] RIP: 0033:0x444e09 [ 47.267673] RSP: 002b:00007ffce99d3d68 EFLAGS: 00000202 ORIG_RAX: 00000000000000e7 [ 47.275343] RAX: ffffffffffffffda RBX: 00007ffce99d3db0 RCX: 0000000000444e09 [ 47.282578] RDX: 0000000000444e09 RSI: 0000000020c4c000 RDI: 0000000000000001 [ 47.289809] RBP: 0000000000000082 R08: 0000000000000000 R09: 00007ffce99d3db0 [ 47.297042] R10: 0000000000000000 R11: 0000000000000202 R12: 00000000004021b0 [ 47.304282] R13: 0000000000402240 R14: 0000000000000000 R15: 0000000000000000