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-386-3,10.128.0.8' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 27.762311] ================================================================== [ 27.763435] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 27.764376] Write of size 8 at addr ffff8801d218b500 by task syzkaller679953/2983 [ 27.765391] [ 27.765624] CPU: 0 PID: 2983 Comm: syzkaller679953 Not tainted 4.14.0-rc5+ #52 [ 27.766600] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.767863] Call Trace: [ 27.768227] dump_stack+0x194/0x257 [ 27.768718] ? arch_local_irq_restore+0x53/0x53 [ 27.769342] ? show_regs_print_info+0x65/0x65 [ 27.769950] ? __kernel_text_address+0xd/0x40 [ 27.770550] ? __internal_add_timer+0x275/0x2d0 [ 27.771175] print_address_description+0x73/0x250 [ 27.771867] ? __internal_add_timer+0x275/0x2d0 [ 27.772493] kasan_report+0x25b/0x340 [ 27.773010] __asan_report_store8_noabort+0x17/0x20 [ 27.773677] __internal_add_timer+0x275/0x2d0 [ 27.774280] ? calc_wheel_index+0x200/0x200 [ 27.774868] mod_timer+0x622/0x15b0 [ 27.775370] ? mod_timer_pending+0x14e0/0x14e0 [ 27.775983] ? __lock_is_held+0xb6/0x140 [ 27.776541] ? __lock_is_held+0xb6/0x140 [ 27.777092] ? __lockdep_init_map+0xe4/0x650 [ 27.777683] ? lockdep_init_map+0x9/0x10 [ 27.778247] ? init_timer_key+0x126/0x3b0 [ 27.778807] ? try_to_del_timer_sync+0x120/0x120 [ 27.779510] ? round_jiffies_up+0xce/0x100 [ 27.780176] ? __round_jiffies_up_relative+0x150/0x150 [ 27.780921] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 27.781588] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 27.782332] __tun_chr_ioctl+0x1b17/0x3d20 [ 27.785670] ? tun_chr_read_iter+0x1e0/0x1e0 [ 27.790045] ? find_held_lock+0x35/0x1d0 [ 27.794081] ? __might_sleep+0x95/0x190 [ 27.798018] ? handle_mm_fault+0x248/0x8d0 [ 27.802228] ? selinux_file_ioctl+0x444/0x690 [ 27.806690] ? __fget_light+0x297/0x380 [ 27.810632] ? selinux_capable+0x40/0x40 [ 27.814669] ? handle_mm_fault+0x410/0x8d0 [ 27.818876] tun_chr_compat_ioctl+0x29/0x30 [ 27.823162] ? tun_chr_compat_ioctl+0x29/0x30 [ 27.827644] compat_SyS_ioctl+0x1d7/0x3290 [ 27.831842] ? up_read+0x1a/0x40 [ 27.835176] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 27.839553] ? do_ioctl+0x60/0x60 [ 27.842976] ? do_fast_syscall_32+0x158/0xf05 [ 27.847440] ? do_ioctl+0x60/0x60 [ 27.850860] do_fast_syscall_32+0x3f2/0xf05 [ 27.855154] ? do_int80_syscall_32+0x940/0x940 [ 27.859703] ? kasan_check_read+0x11/0x20 [ 27.863817] ? syscall_return_slowpath+0x510/0x510 [ 27.868714] ? SyS_rt_sigaction+0x94/0x1b0 [ 27.872916] ? SyS_sigprocmask+0x4b0/0x4b0 [ 27.877116] ? SyS_read+0x184/0x220 [ 27.880712] ? retint_user+0x18/0x20 [ 27.884397] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 27.889212] entry_SYSENTER_compat+0x51/0x60 [ 27.893585] RIP: 0023:0xf7f6cc79 [ 27.896915] RSP: 002b:00000000fffd279c EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 27.904588] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 27.911832] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 27.919069] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 27.926304] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 27.933540] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 27.940792] [ 27.942386] Allocated by task 2983: [ 27.945981] save_stack_trace+0x16/0x20 [ 27.949921] save_stack+0x43/0xd0 [ 27.953341] kasan_kmalloc+0xad/0xe0 [ 27.957020] __kmalloc_node+0x47/0x70 [ 27.960785] kvmalloc_node+0x64/0xd0 [ 27.964465] alloc_netdev_mqs+0x16e/0xed0 [ 27.968577] __tun_chr_ioctl+0x12b2/0x3d20 [ 27.972777] tun_chr_compat_ioctl+0x29/0x30 [ 27.977064] compat_SyS_ioctl+0x1d7/0x3290 [ 27.981265] do_fast_syscall_32+0x3f2/0xf05 [ 27.985555] entry_SYSENTER_compat+0x51/0x60 [ 27.989925] [ 27.991519] Freed by task 2983: [ 27.994764] save_stack_trace+0x16/0x20 [ 27.998704] save_stack+0x43/0xd0 [ 28.002121] kasan_slab_free+0x71/0xc0 [ 28.005971] kfree+0xca/0x250 [ 28.009041] kvfree+0x36/0x60 [ 28.012111] free_netdev+0x2cf/0x360 [ 28.015789] __tun_chr_ioctl+0x2cea/0x3d20 [ 28.019988] tun_chr_compat_ioctl+0x29/0x30 [ 28.024274] compat_SyS_ioctl+0x1d7/0x3290 [ 28.028478] do_fast_syscall_32+0x3f2/0xf05 [ 28.032765] entry_SYSENTER_compat+0x51/0x60 [ 28.037136] [ 28.038731] The buggy address belongs to the object at ffff8801d21881c0 [ 28.038731] which belongs to the cache kmalloc-16384 of size 16384 [ 28.051700] The buggy address is located 13120 bytes inside of [ 28.051700] 16384-byte region [ffff8801d21881c0, ffff8801d218c1c0) [ 28.063885] The buggy address belongs to the page: [ 28.068780] page:ffffea0007486200 count:1 mapcount:0 mapping:ffff8801d21881c0 index:0x0 compound_mapcount: 0 [ 28.078722] flags: 0x200000000008100(slab|head) [ 28.083361] raw: 0200000000008100 ffff8801d21881c0 0000000000000000 0000000100000001 [ 28.091207] raw: ffffea000750de20 ffffea000706d220 ffff8801dac02200 0000000000000000 [ 28.099050] page dumped because: kasan: bad access detected [ 28.104724] [ 28.106321] Memory state around the buggy address: [ 28.111227] ffff8801d218b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.118552] ffff8801d218b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.125875] >ffff8801d218b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.133196] ^ [ 28.136527] ffff8801d218b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.143850] ffff8801d218b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 28.151175] ================================================================== [ 28.158499] Disabling lock debugging due to kernel taint [ 28.163911] Kernel panic - not syncing: panic_on_warn set ... [ 28.163911] [ 28.171238] CPU: 0 PID: 2983 Comm: syzkaller679953 Tainted: G B 4.14.0-rc5+ #52 [ 28.179773] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.189092] Call Trace: [ 28.191650] dump_stack+0x194/0x257 [ 28.195255] ? arch_local_irq_restore+0x53/0x53 [ 28.199888] ? kasan_end_report+0x32/0x50 [ 28.204002] ? lock_downgrade+0x990/0x990 [ 28.208117] ? __internal_add_timer+0x1f0/0x2d0 [ 28.212754] panic+0x1e4/0x417 [ 28.215913] ? __warn+0x1d9/0x1d9 [ 28.219338] ? __internal_add_timer+0x275/0x2d0 [ 28.223970] kasan_end_report+0x50/0x50 [ 28.227908] kasan_report+0x144/0x340 [ 28.231674] __asan_report_store8_noabort+0x17/0x20 [ 28.236652] __internal_add_timer+0x275/0x2d0 [ 28.241112] ? calc_wheel_index+0x200/0x200 [ 28.245403] mod_timer+0x622/0x15b0 [ 28.248998] ? mod_timer_pending+0x14e0/0x14e0 [ 28.253544] ? __lock_is_held+0xb6/0x140 [ 28.257579] ? __lock_is_held+0xb6/0x140 [ 28.261608] ? __lockdep_init_map+0xe4/0x650 [ 28.265981] ? lockdep_init_map+0x9/0x10 [ 28.270005] ? init_timer_key+0x126/0x3b0 [ 28.274119] ? try_to_del_timer_sync+0x120/0x120 [ 28.278839] ? round_jiffies_up+0xce/0x100 [ 28.283038] ? __round_jiffies_up_relative+0x150/0x150 [ 28.288280] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 28.293176] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 28.298689] __tun_chr_ioctl+0x1b17/0x3d20 [ 28.302895] ? tun_chr_read_iter+0x1e0/0x1e0 [ 28.307270] ? find_held_lock+0x35/0x1d0 [ 28.311303] ? __might_sleep+0x95/0x190 [ 28.315242] ? handle_mm_fault+0x248/0x8d0 [ 28.319449] ? selinux_file_ioctl+0x444/0x690 [ 28.323912] ? __fget_light+0x297/0x380 [ 28.327851] ? selinux_capable+0x40/0x40 [ 28.331880] ? handle_mm_fault+0x410/0x8d0 [ 28.336085] tun_chr_compat_ioctl+0x29/0x30 [ 28.340372] ? tun_chr_compat_ioctl+0x29/0x30 [ 28.344834] compat_SyS_ioctl+0x1d7/0x3290 [ 28.349033] ? up_read+0x1a/0x40 [ 28.352363] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 28.356739] ? do_ioctl+0x60/0x60 [ 28.360160] ? do_fast_syscall_32+0x158/0xf05 [ 28.364622] ? do_ioctl+0x60/0x60 [ 28.368042] do_fast_syscall_32+0x3f2/0xf05 [ 28.372332] ? do_int80_syscall_32+0x940/0x940 [ 28.376881] ? kasan_check_read+0x11/0x20 [ 28.380995] ? syscall_return_slowpath+0x510/0x510 [ 28.385892] ? SyS_rt_sigaction+0x94/0x1b0 [ 28.390091] ? SyS_sigprocmask+0x4b0/0x4b0 [ 28.394295] ? SyS_read+0x184/0x220 [ 28.397890] ? retint_user+0x18/0x20 [ 28.401569] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 28.406383] entry_SYSENTER_compat+0x51/0x60 [ 28.410757] RIP: 0023:0xf7f6cc79 [ 28.414099] RSP: 002b:00000000fffd279c EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 28.421770] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 28.429005] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 28.436245] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 28.443479] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 28.450714] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000