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.45' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 58.766386] ================================================================== [ 58.767500] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 58.768431] Write of size 8 at addr ffff8801d2113500 by task syzkaller130785/2985 [ 58.769424] [ 58.769655] CPU: 1 PID: 2985 Comm: syzkaller130785 Not tainted 4.14.0-rc5+ #47 [ 58.770618] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 58.771835] Call Trace: [ 58.772191] dump_stack+0x194/0x257 [ 58.772683] ? arch_local_irq_restore+0x53/0x53 [ 58.773310] ? show_regs_print_info+0x65/0x65 [ 58.773914] ? __kernel_text_address+0xd/0x40 [ 58.774514] ? __internal_add_timer+0x275/0x2d0 [ 58.775143] print_address_description+0x73/0x250 [ 58.775801] ? __internal_add_timer+0x275/0x2d0 [ 58.776425] kasan_report+0x25b/0x340 [ 58.776949] __asan_report_store8_noabort+0x17/0x20 [ 58.777630] __internal_add_timer+0x275/0x2d0 [ 58.778230] ? calc_wheel_index+0x200/0x200 [ 58.778817] mod_timer+0x622/0x15b0 [ 58.779313] ? mod_timer_pending+0x14e0/0x14e0 [ 58.779922] ? __lock_is_held+0xb6/0x140 [ 58.780479] ? __lock_is_held+0xb6/0x140 [ 58.781030] ? __lockdep_init_map+0xe4/0x650 [ 58.781621] ? lockdep_init_map+0x9/0x10 [ 58.782173] ? init_timer_key+0x126/0x3b0 [ 58.782729] ? try_to_del_timer_sync+0x120/0x120 [ 58.783363] ? round_jiffies_up+0xce/0x100 [ 58.783927] ? __round_jiffies_up_relative+0x150/0x150 [ 58.784625] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 58.785281] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 58.786036] __tun_chr_ioctl+0x1b17/0x3d20 [ 58.787087] ? tun_chr_read_iter+0x1e0/0x1e0 [ 58.791463] ? find_held_lock+0x35/0x1d0 [ 58.795498] ? __might_sleep+0x95/0x190 [ 58.799435] ? handle_mm_fault+0x248/0x8d0 [ 58.803643] ? selinux_file_ioctl+0x444/0x690 [ 58.808106] ? __fget_light+0x297/0x380 [ 58.812048] ? selinux_capable+0x40/0x40 [ 58.816085] ? handle_mm_fault+0x410/0x8d0 [ 58.820292] tun_chr_compat_ioctl+0x29/0x30 [ 58.824579] ? tun_chr_compat_ioctl+0x29/0x30 [ 58.829041] compat_SyS_ioctl+0x1d7/0x3290 [ 58.833239] ? up_read+0x1a/0x40 [ 58.836572] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 58.840948] ? do_ioctl+0x60/0x60 [ 58.844371] ? do_fast_syscall_32+0x158/0xf05 [ 58.848834] ? do_ioctl+0x60/0x60 [ 58.852253] do_fast_syscall_32+0x3f2/0xf05 [ 58.856547] ? do_int80_syscall_32+0x940/0x940 [ 58.861096] ? kasan_check_read+0x11/0x20 [ 58.865215] ? syscall_return_slowpath+0x510/0x510 [ 58.870110] ? SyS_rt_sigaction+0x94/0x1b0 [ 58.874310] ? SyS_sigprocmask+0x4b0/0x4b0 [ 58.878510] ? SyS_read+0x184/0x220 [ 58.882103] ? retint_user+0x18/0x20 [ 58.885787] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 58.890601] entry_SYSENTER_compat+0x51/0x60 [ 58.894973] RIP: 0023:0xf7ff2c79 [ 58.898300] RSP: 002b:00000000ffc2805c EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 58.905973] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 58.913211] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 58.920445] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 58.927680] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 58.934915] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 58.942171] [ 58.943766] Allocated by task 2985: [ 58.947360] save_stack_trace+0x16/0x20 [ 58.951302] save_stack+0x43/0xd0 [ 58.954718] kasan_kmalloc+0xad/0xe0 [ 58.958408] __kmalloc_node+0x47/0x70 [ 58.962174] kvmalloc_node+0x64/0xd0 [ 58.965856] alloc_netdev_mqs+0x16e/0xed0 [ 58.969968] __tun_chr_ioctl+0x12b2/0x3d20 [ 58.974165] tun_chr_compat_ioctl+0x29/0x30 [ 58.978450] compat_SyS_ioctl+0x1d7/0x3290 [ 58.982648] do_fast_syscall_32+0x3f2/0xf05 [ 58.986934] entry_SYSENTER_compat+0x51/0x60 [ 58.991305] [ 58.992898] Freed by task 2985: [ 58.996141] save_stack_trace+0x16/0x20 [ 59.000080] save_stack+0x43/0xd0 [ 59.003498] kasan_slab_free+0x71/0xc0 [ 59.007347] kfree+0xca/0x250 [ 59.010416] kvfree+0x36/0x60 [ 59.013485] free_netdev+0x2cf/0x360 [ 59.017163] __tun_chr_ioctl+0x2cea/0x3d20 [ 59.021361] tun_chr_compat_ioctl+0x29/0x30 [ 59.025647] compat_SyS_ioctl+0x1d7/0x3290 [ 59.029848] do_fast_syscall_32+0x3f2/0xf05 [ 59.034135] entry_SYSENTER_compat+0x51/0x60 [ 59.038504] [ 59.040101] The buggy address belongs to the object at ffff8801d21101c0 [ 59.040101] which belongs to the cache kmalloc-16384 of size 16384 [ 59.053068] The buggy address is located 13120 bytes inside of [ 59.053068] 16384-byte region [ffff8801d21101c0, ffff8801d21141c0) [ 59.065253] The buggy address belongs to the page: [ 59.070146] page:ffffea0007484400 count:1 mapcount:0 mapping:ffff8801d21101c0 index:0x0 compound_mapcount: 0 [ 59.080078] flags: 0x200000000008100(slab|head) [ 59.084715] raw: 0200000000008100 ffff8801d21101c0 0000000000000000 0000000100000001 [ 59.092560] raw: ffffea000765d020 ffffea0007478620 ffff8801dac02200 0000000000000000 [ 59.100407] page dumped because: kasan: bad access detected [ 59.106081] [ 59.107671] Memory state around the buggy address: [ 59.112563] ffff8801d2113400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.119887] ffff8801d2113480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.127849] >ffff8801d2113500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.135171] ^ [ 59.138500] ffff8801d2113580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.145838] ffff8801d2113600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 59.153159] ================================================================== [ 59.160479] Disabling lock debugging due to kernel taint [ 59.165889] Kernel panic - not syncing: panic_on_warn set ... [ 59.165889] [ 59.173213] CPU: 1 PID: 2985 Comm: syzkaller130785 Tainted: G B 4.14.0-rc5+ #47 [ 59.181752] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 59.191072] Call Trace: [ 59.193634] dump_stack+0x194/0x257 [ 59.197225] ? arch_local_irq_restore+0x53/0x53 [ 59.201860] ? kasan_end_report+0x32/0x50 [ 59.205975] ? lock_downgrade+0x990/0x990 [ 59.210098] ? __internal_add_timer+0x1c0/0x2d0 [ 59.214731] panic+0x1e4/0x417 [ 59.217889] ? __warn+0x1d9/0x1d9 [ 59.221314] ? __internal_add_timer+0x275/0x2d0 [ 59.225949] kasan_end_report+0x50/0x50 [ 59.229888] kasan_report+0x144/0x340 [ 59.233653] __asan_report_store8_noabort+0x17/0x20 [ 59.238630] __internal_add_timer+0x275/0x2d0 [ 59.243090] ? calc_wheel_index+0x200/0x200 [ 59.247382] mod_timer+0x622/0x15b0 [ 59.250976] ? mod_timer_pending+0x14e0/0x14e0 [ 59.255522] ? __lock_is_held+0xb6/0x140 [ 59.259552] ? __lock_is_held+0xb6/0x140 [ 59.263579] ? __lockdep_init_map+0xe4/0x650 [ 59.267951] ? lockdep_init_map+0x9/0x10 [ 59.271976] ? init_timer_key+0x126/0x3b0 [ 59.276087] ? try_to_del_timer_sync+0x120/0x120 [ 59.280804] ? round_jiffies_up+0xce/0x100 [ 59.285000] ? __round_jiffies_up_relative+0x150/0x150 [ 59.290240] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 59.295136] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 59.300639] __tun_chr_ioctl+0x1b17/0x3d20 [ 59.304841] ? tun_chr_read_iter+0x1e0/0x1e0 [ 59.309211] ? find_held_lock+0x35/0x1d0 [ 59.313242] ? __might_sleep+0x95/0x190 [ 59.317178] ? handle_mm_fault+0x248/0x8d0 [ 59.321380] ? selinux_file_ioctl+0x444/0x690 [ 59.325837] ? __fget_light+0x297/0x380 [ 59.329773] ? selinux_capable+0x40/0x40 [ 59.333801] ? handle_mm_fault+0x410/0x8d0 [ 59.337999] tun_chr_compat_ioctl+0x29/0x30 [ 59.342285] ? tun_chr_compat_ioctl+0x29/0x30 [ 59.346748] compat_SyS_ioctl+0x1d7/0x3290 [ 59.350945] ? up_read+0x1a/0x40 [ 59.354273] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 59.358646] ? do_ioctl+0x60/0x60 [ 59.362064] ? do_fast_syscall_32+0x158/0xf05 [ 59.366523] ? do_ioctl+0x60/0x60 [ 59.369938] do_fast_syscall_32+0x3f2/0xf05 [ 59.374236] ? do_int80_syscall_32+0x940/0x940 [ 59.378786] ? kasan_check_read+0x11/0x20 [ 59.382897] ? syscall_return_slowpath+0x510/0x510 [ 59.387793] ? SyS_rt_sigaction+0x94/0x1b0 [ 59.391996] ? SyS_sigprocmask+0x4b0/0x4b0 [ 59.396194] ? SyS_read+0x184/0x220 [ 59.399786] ? retint_user+0x18/0x20 [ 59.403468] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 59.408277] entry_SYSENTER_compat+0x51/0x60 [ 59.412646] RIP: 0023:0xf7ff2c79 [ 59.415976] RSP: 002b:00000000ffc2805c EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 59.423645] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 59.430879] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 59.438115] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 59.445352] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 59.452587] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 59.459864] Dumping ftrace buffer: [ 59.463368] (ftrace buffer empty) [ 59.467046] Kernel Offset: disabled [ 59.470641] Rebooting in 86400 seconds..