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-3,10.128.0.31' (ECDSA) to the list of known hosts. 2017/10/18 08:47:11 parsed 1 programs 2017/10/18 08:47:11 executed programs: 0 syzkaller login: [ 46.326300] ================================================================== [ 46.327391] BUG: KASAN: use-after-free in detach_if_pending+0x557/0x610 [ 46.328278] Write of size 8 at addr ffff8801d1ffb638 by task syz-executor0/2985 [ 46.329253] [ 46.329487] CPU: 0 PID: 2985 Comm: syz-executor0 Not tainted 4.14.0-rc5+ #136 [ 46.330437] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.331672] Call Trace: [ 46.332028] dump_stack+0x194/0x257 [ 46.332518] ? arch_local_irq_restore+0x53/0x53 [ 46.333139] ? show_regs_print_info+0x65/0x65 [ 46.333740] ? lock_acquire+0x1d5/0x580 [ 46.334272] ? lock_timer_base+0x1a3/0x2b0 [ 46.334838] ? detach_if_pending+0x557/0x610 [ 46.335428] print_address_description+0x73/0x250 [ 46.336087] ? detach_if_pending+0x557/0x610 [ 46.336677] kasan_report+0x25b/0x340 [ 46.337191] __asan_report_store8_noabort+0x17/0x20 [ 46.337856] detach_if_pending+0x557/0x610 [ 46.338424] ? trace_raw_output_tick_stop+0x130/0x130 [ 46.339113] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 46.339731] ? lock_timer_base+0x1a3/0x2b0 [ 46.340298] ? lock_timer_base+0x1eb/0x2b0 [ 46.340868] ? __internal_add_timer+0x2d0/0x2d0 [ 46.341488] ? lock_downgrade+0x990/0x990 [ 46.342041] ? trace_hardirqs_on+0xd/0x10 [ 46.342602] try_to_del_timer_sync+0xa2/0x120 [ 46.343199] ? del_timer+0x130/0x130 [ 46.343700] ? del_timer_sync+0xeb/0x240 [ 46.344251] del_timer_sync+0x18a/0x240 [ 46.344787] tun_free_netdev+0x105/0x1b0 [ 46.345332] ? tun_xdp+0x410/0x410 [ 46.345809] ? cpumask_next+0x24/0x30 [ 46.346338] ? netdev_refcnt_read+0xed/0x150 [ 46.346950] ? tun_xdp+0x410/0x410 [ 46.350456] netdev_run_todo+0x870/0xca0 [ 46.354482] ? do_group_exit+0x149/0x400 [ 46.358510] ? syscall_return_slowpath+0x42f/0x510 [ 46.363403] ? entry_SYSCALL_64_fastpath+0xbc/0xbe [ 46.368298] ? register_netdev+0x30/0x30 [ 46.372325] ? find_held_lock+0x35/0x1d0 [ 46.376360] ? lock_downgrade+0x990/0x990 [ 46.380480] ? refcount_sub_and_test+0x115/0x1b0 [ 46.385200] ? refcount_inc+0x50/0x50 [ 46.388966] ? refcount_inc+0x50/0x50 [ 46.392736] ? sk_destruct+0x4c/0x80 [ 46.396413] ? __sk_free+0x5c/0x230 [ 46.400008] ? sk_free+0x2f/0x40 [ 46.403339] ? __tun_detach+0x176/0x1390 [ 46.407377] ? tun_attach+0xfa0/0xfa0 [ 46.411147] ? dentry_free+0xd2/0x130 [ 46.414918] ? locks_remove_file+0x3fa/0x5a0 [ 46.419294] ? fcntl_setlk+0x10c0/0x10c0 [ 46.423325] ? __fsnotify_parent+0xb4/0x3a0 [ 46.427617] ? fsnotify+0x1af0/0x1af0 [ 46.431385] ? __tun_detach+0x1390/0x1390 [ 46.435497] ? __tun_detach+0x1390/0x1390 [ 46.439609] rtnl_unlock+0xe/0x10 [ 46.443028] tun_chr_close+0x49/0x60 [ 46.446707] __fput+0x327/0x7e0 [ 46.449964] ? fput+0x140/0x140 [ 46.453213] ? check_same_owner+0x320/0x320 [ 46.457497] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.461965] ____fput+0x15/0x20 [ 46.465209] task_work_run+0x199/0x270 [ 46.469079] ? task_work_cancel+0x210/0x210 [ 46.473373] ? _raw_spin_unlock+0x22/0x30 [ 46.477490] ? switch_task_namespaces+0x87/0xc0 [ 46.482128] do_exit+0x9b5/0x1ad0 [ 46.485553] ? mm_update_next_owner+0x930/0x930 [ 46.490189] ? check_same_owner+0x320/0x320 [ 46.494477] ? lock_acquire+0x1d5/0x580 [ 46.498414] ? futex_wait_setup+0x14a/0x3d0 [ 46.502703] ? __might_sleep+0x95/0x190 [ 46.506646] ? find_held_lock+0x35/0x1d0 [ 46.510677] ? futex_wait+0x402/0x990 [ 46.514444] ? lock_downgrade+0x990/0x990 [ 46.518562] ? do_raw_spin_trylock+0x190/0x190 [ 46.523110] ? check_noncircular+0x20/0x20 [ 46.527321] ? drop_futex_key_refs.isra.13+0x63/0xb0 [ 46.532387] ? futex_wait+0x69e/0x990 [ 46.536157] ? find_held_lock+0x35/0x1d0 [ 46.540190] ? get_signal+0x7ae/0x16d0 [ 46.544044] ? lock_downgrade+0x990/0x990 [ 46.548163] do_group_exit+0x149/0x400 [ 46.552017] ? __lock_is_held+0xb6/0x140 [ 46.556041] ? SyS_exit+0x30/0x30 [ 46.559457] ? _raw_spin_unlock_irq+0x27/0x70 [ 46.563922] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.568907] get_signal+0x73f/0x16d0 [ 46.572602] ? ptrace_notify+0x130/0x130 [ 46.576632] ? kvfree+0x3b/0x60 [ 46.579886] ? exit_robust_list+0x240/0x240 [ 46.584189] do_signal+0x94/0x1ee0 [ 46.587692] ? lock_release+0xa40/0xa40 [ 46.591633] ? __lock_is_held+0xb6/0x140 [ 46.595661] ? setup_sigcontext+0x7d0/0x7d0 [ 46.599967] ? check_same_owner+0x320/0x320 [ 46.604254] ? fget_raw+0x20/0x20 [ 46.607677] ? tun_chr_compat_ioctl+0x30/0x30 [ 46.612138] ? tun_chr_ioctl+0x2a/0x40 [ 46.615991] ? exit_to_usermode_loop+0x8c/0x310 [ 46.620632] exit_to_usermode_loop+0x214/0x310 [ 46.625181] ? trace_event_raw_event_sys_exit+0x260/0x260 [ 46.630685] ? selinux_capable+0x40/0x40 [ 46.634718] syscall_return_slowpath+0x42f/0x510 [ 46.639441] ? prepare_exit_to_usermode+0x2d0/0x2d0 [ 46.644425] ? entry_SYSCALL_64_fastpath+0x91/0xbe [ 46.649323] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.654312] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 46.659038] entry_SYSCALL_64_fastpath+0xbc/0xbe [ 46.663757] RIP: 0033:0x452779 [ 46.666913] RSP: 002b:00007f2ef1971ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 46.674585] RAX: fffffffffffffe00 RBX: 0000000000758040 RCX: 0000000000452779 [ 46.681819] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000758040 [ 46.689053] RBP: 0000000000758040 R08: 0000000000000000 R09: 0000000000758020 [ 46.696289] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 46.703521] R13: 00007ffd099d2b5f R14: 00007f2ef19729c0 R15: 0000000000000000 [ 46.710771] [ 46.712365] Allocated by task 2985: [ 46.715959] save_stack_trace+0x16/0x20 [ 46.719898] save_stack+0x43/0xd0 [ 46.723315] kasan_kmalloc+0xad/0xe0 [ 46.726991] __kmalloc_node+0x47/0x70 [ 46.730758] kvmalloc_node+0x64/0xd0 [ 46.734439] alloc_netdev_mqs+0x16e/0xed0 [ 46.738548] __tun_chr_ioctl+0x12b2/0x3d20 [ 46.742743] tun_chr_ioctl+0x2a/0x40 [ 46.746421] do_vfs_ioctl+0x1b1/0x1520 [ 46.750274] SyS_ioctl+0x8f/0xc0 [ 46.753604] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.758318] [ 46.759911] Freed by task 2985: [ 46.763153] save_stack_trace+0x16/0x20 [ 46.767090] save_stack+0x43/0xd0 [ 46.770508] kasan_slab_free+0x71/0xc0 [ 46.774365] kfree+0xca/0x250 [ 46.777434] kvfree+0x36/0x60 [ 46.780504] free_netdev+0x2cf/0x360 [ 46.784181] __tun_chr_ioctl+0x2cea/0x3d20 [ 46.788377] tun_chr_ioctl+0x2a/0x40 [ 46.792054] do_vfs_ioctl+0x1b1/0x1520 [ 46.795905] SyS_ioctl+0x8f/0xc0 [ 46.799240] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.803956] [ 46.805548] The buggy address belongs to the object at ffff8801d1ff8300 [ 46.805548] which belongs to the cache kmalloc-16384 of size 16384 [ 46.818512] The buggy address is located 13112 bytes inside of [ 46.818512] 16384-byte region [ffff8801d1ff8300, ffff8801d1ffc300) [ 46.830694] The buggy address belongs to the page: [ 46.835586] page:ffffea000747fe00 count:1 mapcount:0 mapping:ffff8801d1ff8300 index:0x0 compound_mapcount: 0 [ 46.845516] flags: 0x200000000008100(slab|head) [ 46.850149] raw: 0200000000008100 ffff8801d1ff8300 0000000000000000 0000000100000001 [ 46.857995] raw: ffffea00074a9820 ffff8801dac01c48 ffff8801dac02200 0000000000000000 [ 46.865842] page dumped because: kasan: bad access detected [ 46.871513] [ 46.873104] Memory state around the buggy address: [ 46.877998] ffff8801d1ffb500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.885321] ffff8801d1ffb580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.892643] >ffff8801d1ffb600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.899965] ^ [ 46.905116] ffff8801d1ffb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.912439] ffff8801d1ffb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.919764] ================================================================== [ 46.927088] Disabling lock debugging due to kernel taint [ 46.932846] Kernel panic - not syncing: panic_on_warn set ... [ 46.932846] [ 46.940169] CPU: 0 PID: 2985 Comm: syz-executor0 Tainted: G B 4.14.0-rc5+ #136 [ 46.948621] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.957939] Call Trace: [ 46.960493] dump_stack+0x194/0x257 [ 46.964084] ? arch_local_irq_restore+0x53/0x53 [ 46.968713] ? kasan_end_report+0x32/0x50 [ 46.972826] ? lock_downgrade+0x990/0x990 [ 46.976942] ? detach_if_pending+0x510/0x610 [ 46.981923] panic+0x1e4/0x417 [ 46.985078] ? __warn+0x1d9/0x1d9 [ 46.988501] ? detach_if_pending+0x557/0x610 [ 46.992873] kasan_end_report+0x50/0x50 [ 46.996814] kasan_report+0x144/0x340 [ 47.000579] __asan_report_store8_noabort+0x17/0x20 [ 47.005557] detach_if_pending+0x557/0x610 [ 47.009757] ? trace_raw_output_tick_stop+0x130/0x130 [ 47.014911] ? _raw_spin_lock_irqsave+0x9e/0xc0 [ 47.019543] ? lock_timer_base+0x1a3/0x2b0 [ 47.023739] ? lock_timer_base+0x1eb/0x2b0 [ 47.027940] ? __internal_add_timer+0x2d0/0x2d0 [ 47.032575] ? lock_downgrade+0x990/0x990 [ 47.036684] ? trace_hardirqs_on+0xd/0x10 [ 47.040797] try_to_del_timer_sync+0xa2/0x120 [ 47.045253] ? del_timer+0x130/0x130 [ 47.048932] ? del_timer_sync+0xeb/0x240 [ 47.052958] del_timer_sync+0x18a/0x240 [ 47.056897] tun_free_netdev+0x105/0x1b0 [ 47.060921] ? tun_xdp+0x410/0x410 [ 47.064423] ? cpumask_next+0x24/0x30 [ 47.068190] ? netdev_refcnt_read+0xed/0x150 [ 47.072564] ? tun_xdp+0x410/0x410 [ 47.076066] netdev_run_todo+0x870/0xca0 [ 47.080088] ? do_group_exit+0x149/0x400 [ 47.084113] ? syscall_return_slowpath+0x42f/0x510 [ 47.089006] ? entry_SYSCALL_64_fastpath+0xbc/0xbe [ 47.093900] ? register_netdev+0x30/0x30 [ 47.097928] ? find_held_lock+0x35/0x1d0 [ 47.101956] ? lock_downgrade+0x990/0x990 [ 47.106069] ? refcount_sub_and_test+0x115/0x1b0 [ 47.110787] ? refcount_inc+0x50/0x50 [ 47.114548] ? refcount_inc+0x50/0x50 [ 47.118314] ? sk_destruct+0x4c/0x80 [ 47.121990] ? __sk_free+0x5c/0x230 [ 47.125583] ? sk_free+0x2f/0x40 [ 47.128913] ? __tun_detach+0x176/0x1390 [ 47.132943] ? tun_attach+0xfa0/0xfa0 [ 47.136708] ? dentry_free+0xd2/0x130 [ 47.140477] ? locks_remove_file+0x3fa/0x5a0 [ 47.144858] ? fcntl_setlk+0x10c0/0x10c0 [ 47.148884] ? __fsnotify_parent+0xb4/0x3a0 [ 47.153171] ? fsnotify+0x1af0/0x1af0 [ 47.156935] ? __tun_detach+0x1390/0x1390 [ 47.161047] ? __tun_detach+0x1390/0x1390 [ 47.165160] rtnl_unlock+0xe/0x10 [ 47.168574] tun_chr_close+0x49/0x60 [ 47.172250] __fput+0x327/0x7e0 [ 47.175495] ? fput+0x140/0x140 [ 47.178740] ? check_same_owner+0x320/0x320 [ 47.183022] ? _raw_spin_unlock_irq+0x27/0x70 [ 47.187481] ____fput+0x15/0x20 [ 47.190723] task_work_run+0x199/0x270 [ 47.194575] ? task_work_cancel+0x210/0x210 [ 47.198862] ? _raw_spin_unlock+0x22/0x30 [ 47.202980] ? switch_task_namespaces+0x87/0xc0 [ 47.207611] do_exit+0x9b5/0x1ad0 [ 47.211032] ? mm_update_next_owner+0x930/0x930 [ 47.215664] ? check_same_owner+0x320/0x320 [ 47.219948] ? lock_acquire+0x1d5/0x580 [ 47.223883] ? futex_wait_setup+0x14a/0x3d0 [ 47.228170] ? __might_sleep+0x95/0x190 [ 47.232108] ? find_held_lock+0x35/0x1d0 [ 47.236220] ? futex_wait+0x402/0x990 [ 47.239985] ? lock_downgrade+0x990/0x990 [ 47.244096] ? do_raw_spin_trylock+0x190/0x190 [ 47.248642] ? check_noncircular+0x20/0x20 [ 47.252845] ? drop_futex_key_refs.isra.13+0x63/0xb0 [ 47.257909] ? futex_wait+0x69e/0x990 [ 47.261675] ? find_held_lock+0x35/0x1d0 [ 47.265702] ? get_signal+0x7ae/0x16d0 [ 47.269551] ? lock_downgrade+0x990/0x990 [ 47.273662] do_group_exit+0x149/0x400 [ 47.277511] ? __lock_is_held+0xb6/0x140 [ 47.281533] ? SyS_exit+0x30/0x30 [ 47.284950] ? _raw_spin_unlock_irq+0x27/0x70 [ 47.289409] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 47.294389] get_signal+0x73f/0x16d0 [ 47.298071] ? ptrace_notify+0x130/0x130 [ 47.302098] ? kvfree+0x3b/0x60 [ 47.305344] ? exit_robust_list+0x240/0x240 [ 47.309634] do_signal+0x94/0x1ee0 [ 47.313136] ? lock_release+0xa40/0xa40 [ 47.317073] ? __lock_is_held+0xb6/0x140 [ 47.321100] ? setup_sigcontext+0x7d0/0x7d0 [ 47.325391] ? check_same_owner+0x320/0x320