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-6,10.128.0.54' (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: [ 24.029559] ================================================================== [ 24.037011] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 24.043738] Write of size 8 at addr ffff8801d00d3780 by task syzkaller818442/2983 [ 24.051327] [ 24.052929] CPU: 0 PID: 2983 Comm: syzkaller818442 Not tainted 4.13.0+ #79 [ 24.059911] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.069595] Call Trace: [ 24.072157] dump_stack+0x194/0x257 [ 24.075760] ? arch_local_irq_restore+0x53/0x53 [ 24.080419] ? show_regs_print_info+0x65/0x65 [ 24.084893] ? lock_timer_base+0x1a3/0x2b0 [ 24.089103] ? detach_if_pending+0x557/0x610 [ 24.093485] print_address_description+0x73/0x250 [ 24.098298] ? detach_if_pending+0x557/0x610 [ 24.102677] kasan_report+0x24e/0x340 [ 24.106455] __asan_report_store8_noabort+0x17/0x20 [ 24.111440] detach_if_pending+0x557/0x610 [ 24.115652] ? trace_raw_output_tick_stop+0x130/0x130 [ 24.120816] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 24.125455] ? lock_timer_base+0x1a3/0x2b0 [ 24.129672] ? lock_timer_base+0x1eb/0x2b0 [ 24.133881] ? __internal_add_timer+0x2d0/0x2d0 [ 24.138522] ? trace_hardirqs_on+0xd/0x10 [ 24.142648] try_to_del_timer_sync+0xa2/0x120 [ 24.147115] ? del_timer+0x130/0x130 [ 24.150802] ? del_timer_sync+0xeb/0x240 [ 24.154840] del_timer_sync+0x18a/0x240 [ 24.158788] tun_free_netdev+0x105/0x1b0 [ 24.162822] ? tun_xdp+0x410/0x410 [ 24.166336] ? cpumask_next+0x24/0x30 [ 24.170108] ? netdev_refcnt_read+0xed/0x150 [ 24.174492] ? tun_xdp+0x410/0x410 [ 24.178003] netdev_run_todo+0x870/0xca0 [ 24.182037] ? do_group_exit+0x149/0x400 [ 24.186076] ? register_netdev+0x30/0x30 [ 24.190110] ? lock_downgrade+0x990/0x990 [ 24.194228] ? trace_hardirqs_on+0xd/0x10 [ 24.198365] ? refcount_sub_and_test+0x115/0x1b0 [ 24.203092] ? refcount_inc+0x50/0x50 [ 24.206866] ? refcount_inc+0x50/0x50 [ 24.210644] ? sk_destruct+0x4c/0x80 [ 24.214327] ? __sk_free+0x5c/0x230 [ 24.217926] ? sk_free+0x2f/0x40 [ 24.221264] ? __tun_detach+0x176/0x1390 [ 24.225309] ? tun_attach+0xf90/0xf90 [ 24.229092] ? locks_remove_file+0x3fa/0x5a0 [ 24.233474] ? fcntl_setlk+0x10d0/0x10d0 [ 24.237509] ? __fsnotify_parent+0xb4/0x3a0 [ 24.241806] ? fsnotify+0x1af0/0x1af0 [ 24.245583] ? __tun_detach+0x1390/0x1390 [ 24.249711] ? __tun_detach+0x1390/0x1390 [ 24.253833] rtnl_unlock+0xe/0x10 [ 24.257258] tun_chr_close+0x49/0x60 [ 24.260945] __fput+0x333/0x7f0 [ 24.264201] ? fput+0x140/0x140 [ 24.267456] ? check_same_owner+0x320/0x320 [ 24.271756] ____fput+0x15/0x20 [ 24.275008] task_work_run+0x199/0x270 [ 24.278873] ? task_work_cancel+0x210/0x210 [ 24.283168] ? free_nsproxy+0x185/0x1f0 [ 24.287116] ? switch_task_namespaces+0xa2/0xc0 [ 24.291761] do_exit+0xa52/0x1b40 [ 24.295187] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.300178] ? check_noncircular+0x20/0x20 [ 24.304393] ? mm_update_next_owner+0x930/0x930 [ 24.309033] ? __pmd_alloc+0x4e0/0x4e0 [ 24.312906] ? find_held_lock+0x39/0x1d0 [ 24.316950] ? lock_downgrade+0x990/0x990 [ 24.321090] ? handle_mm_fault+0x410/0x8d0 [ 24.325295] ? down_read_trylock+0xdb/0x170 [ 24.329589] ? __handle_mm_fault+0x39c0/0x39c0 [ 24.334159] ? vmacache_find+0x61/0x270 [ 24.338105] ? vmacache_update+0xfe/0x130 [ 24.342228] ? up_read+0x1a/0x40 [ 24.345567] ? __do_page_fault+0x35b/0xb60 [ 24.349775] ? do_vfs_ioctl+0x492/0x1530 [ 24.353819] ? do_page_fault+0xee/0x720 [ 24.357766] ? __do_page_fault+0xb60/0xb60 [ 24.361972] ? putname+0xf3/0x130 [ 24.365403] do_group_exit+0x149/0x400 [ 24.369715] ? lockdep_sys_exit+0x47/0xf0 [ 24.373833] ? SyS_exit+0x30/0x30 [ 24.377259] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.382254] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 24.386986] SyS_exit_group+0x1d/0x20 [ 24.390760] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.396103] RIP: 0033:0x445109 [ 24.399263] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 24.406946] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445109 [ 24.414188] RDX: 0000000000445109 RSI: 0000000020d8bfd8 RDI: 0000000000000001 [ 24.421427] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 24.428668] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000402760 [ 24.435906] R13: 00000000004027f0 R14: 0000000000000000 R15: 0000000000000000 [ 24.443163] [ 24.444765] Allocated by task 2983: [ 24.448364] save_stack_trace+0x16/0x20 [ 24.452308] save_stack+0x43/0xd0 [ 24.455733] kasan_kmalloc+0xad/0xe0 [ 24.459426] __kmalloc_node+0x47/0x70 [ 24.463196] kvmalloc_node+0x64/0xd0 [ 24.466881] alloc_netdev_mqs+0x16e/0xed0 [ 24.471000] __tun_chr_ioctl+0x12be/0x3d20 [ 24.475204] tun_chr_ioctl+0x2a/0x40 [ 24.478887] do_vfs_ioctl+0x1b1/0x1530 [ 24.482742] SyS_ioctl+0x8f/0xc0 [ 24.486080] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.490802] [ 24.492409] Freed by task 2983: [ 24.495658] save_stack_trace+0x16/0x20 [ 24.499604] save_stack+0x43/0xd0 [ 24.503025] kasan_slab_free+0x71/0xc0 [ 24.506880] kfree+0xca/0x250 [ 24.509955] kvfree+0x36/0x60 [ 24.513029] free_netdev+0x2cf/0x360 [ 24.516711] __tun_chr_ioctl+0x2cf6/0x3d20 [ 24.520915] tun_chr_ioctl+0x2a/0x40 [ 24.524599] do_vfs_ioctl+0x1b1/0x1530 [ 24.528455] SyS_ioctl+0x8f/0xc0 [ 24.531791] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 24.536514] [ 24.538112] The buggy address belongs to the object at ffff8801d00d0380 [ 24.538112] which belongs to the cache kmalloc-16384 of size 16384 [ 24.551095] The buggy address is located 13312 bytes inside of [ 24.551095] 16384-byte region [ffff8801d00d0380, ffff8801d00d4380) [ 24.563283] The buggy address belongs to the page: [ 24.568183] page:ffffea0007403400 count:1 mapcount:0 mapping:ffff8801d00d0380 index:0x0 compound_mapcount: 0 [ 24.578135] flags: 0x200000000008100(slab|head) [ 24.582776] raw: 0200000000008100 ffff8801d00d0380 0000000000000000 0000000100000001 [ 24.590624] raw: ffffea0007381a20 ffff8801dac01c50 ffff8801dac02200 0000000000000000 [ 24.598471] page dumped because: kasan: bad access detected [ 24.604147] [ 24.605746] Memory state around the buggy address: [ 24.610643] ffff8801d00d3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.617970] ffff8801d00d3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.625299] >ffff8801d00d3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.632624] ^ [ 24.635969] ffff8801d00d3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.643296] ffff8801d00d3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.650622] ================================================================== [ 24.657964] Disabling lock debugging due to kernel taint [ 24.663812] Kernel panic - not syncing: panic_on_warn set ... [ 24.663812] [ 24.671138] CPU: 0 PID: 2983 Comm: syzkaller818442 Tainted: G B 4.13.0+ #79 [ 24.679328] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.688648] Call Trace: [ 24.691200] dump_stack+0x194/0x257 [ 24.694797] ? arch_local_irq_restore+0x53/0x53 [ 24.699432] ? vprintk_default+0x28/0x30 [ 24.703460] ? detach_if_pending+0x470/0x610 [ 24.707832] panic+0x1e4/0x417 [ 24.710990] ? __warn+0x1d9/0x1d9 [ 24.714413] ? detach_if_pending+0x557/0x610 [ 24.718787] kasan_end_report+0x50/0x50 [ 24.722725] kasan_report+0x137/0x340 [ 24.726492] __asan_report_store8_noabort+0x17/0x20 [ 24.731560] detach_if_pending+0x557/0x610 [ 24.735765] ? trace_raw_output_tick_stop+0x130/0x130 [ 24.740920] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 24.745553] ? lock_timer_base+0x1a3/0x2b0 [ 24.749754] ? lock_timer_base+0x1eb/0x2b0 [ 24.753972] ? __internal_add_timer+0x2d0/0x2d0 [ 24.758608] ? trace_hardirqs_on+0xd/0x10 [ 24.762726] try_to_del_timer_sync+0xa2/0x120 [ 24.767185] ? del_timer+0x130/0x130 [ 24.770862] ? del_timer_sync+0xeb/0x240 [ 24.774900] del_timer_sync+0x18a/0x240 [ 24.778840] tun_free_netdev+0x105/0x1b0 [ 24.782865] ? tun_xdp+0x410/0x410 [ 24.786369] ? cpumask_next+0x24/0x30 [ 24.790134] ? netdev_refcnt_read+0xed/0x150 [ 24.794509] ? tun_xdp+0x410/0x410 [ 24.798014] netdev_run_todo+0x870/0xca0 [ 24.802040] ? do_group_exit+0x149/0x400 [ 24.806071] ? register_netdev+0x30/0x30 [ 24.810098] ? lock_downgrade+0x990/0x990 [ 24.814211] ? trace_hardirqs_on+0xd/0x10 [ 24.818332] ? refcount_sub_and_test+0x115/0x1b0 [ 24.823062] ? refcount_inc+0x50/0x50 [ 24.826830] ? refcount_inc+0x50/0x50 [ 24.830600] ? sk_destruct+0x4c/0x80 [ 24.834277] ? __sk_free+0x5c/0x230 [ 24.837868] ? sk_free+0x2f/0x40 [ 24.841200] ? __tun_detach+0x176/0x1390 [ 24.845230] ? tun_attach+0xf90/0xf90 [ 24.849002] ? locks_remove_file+0x3fa/0x5a0 [ 24.853389] ? fcntl_setlk+0x10d0/0x10d0 [ 24.857418] ? __fsnotify_parent+0xb4/0x3a0 [ 24.861706] ? fsnotify+0x1af0/0x1af0 [ 24.865472] ? __tun_detach+0x1390/0x1390 [ 24.869586] ? __tun_detach+0x1390/0x1390 [ 24.873698] rtnl_unlock+0xe/0x10 [ 24.877115] tun_chr_close+0x49/0x60 [ 24.880794] __fput+0x333/0x7f0 [ 24.884041] ? fput+0x140/0x140 [ 24.887287] ? check_same_owner+0x320/0x320 [ 24.891582] ____fput+0x15/0x20 [ 24.894867] task_work_run+0x199/0x270 [ 24.898719] ? task_work_cancel+0x210/0x210 [ 24.903005] ? free_nsproxy+0x185/0x1f0 [ 24.906944] ? switch_task_namespaces+0xa2/0xc0 [ 24.911578] do_exit+0xa52/0x1b40 [ 24.914999] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 24.919980] ? check_noncircular+0x20/0x20 [ 24.924186] ? mm_update_next_owner+0x930/0x930 [ 24.928821] ? __pmd_alloc+0x4e0/0x4e0 [ 24.932678] ? find_held_lock+0x39/0x1d0 [ 24.936714] ? lock_downgrade+0x990/0x990 [ 24.940839] ? handle_mm_fault+0x410/0x8d0 [ 24.945039] ? down_read_trylock+0xdb/0x170 [ 24.949324] ? __handle_mm_fault+0x39c0/0x39c0 [ 24.953870] ? vmacache_find+0x61/0x270 [ 24.957822] ? vmacache_update+0xfe/0x130 [ 24.961939] ? up_read+0x1a/0x40 [ 24.965268] ? __do_page_fault+0x35b/0xb60 [ 24.969469] ? do_vfs_ioctl+0x492/0x1530 [ 24.973501] ? do_page_fault+0xee/0x720 [ 24.977439] ? __do_page_fault+0xb60/0xb60 [ 24.981640] ? putname+0xf3/0x130 [ 24.985061] do_group_exit+0x149/0x400 [ 24.988927] ? lockdep_sys_exit+0x47/0xf0 [ 24.993054] ? SyS_exit+0x30/0x30 [ 24.996475] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.001458] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.006180] SyS_exit_group+0x1d/0x20 [ 25.009947] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 25.014666] RIP: 0033:0x445109 [ 25.017832] RSP: 002b:00000000007efe48 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 [ 25.025511] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445109