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-4,10.128.15.233' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 44.174358] ================================================================== [ 44.175458] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 44.176380] Write of size 8 at addr ffff8801d1cd3600 by task syzkaller535947/2989 [ 44.177374] [ 44.177605] CPU: 1 PID: 2989 Comm: syzkaller535947 Not tainted 4.14.0-rc5+ #52 [ 44.178571] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.179789] Call Trace: [ 44.180145] dump_stack+0x194/0x257 [ 44.180637] ? arch_local_irq_restore+0x53/0x53 [ 44.181259] ? show_regs_print_info+0x65/0x65 [ 44.181863] ? __kernel_text_address+0xd/0x40 [ 44.182464] ? __internal_add_timer+0x275/0x2d0 [ 44.183086] print_address_description+0x73/0x250 [ 44.183758] ? __internal_add_timer+0x275/0x2d0 [ 44.184382] kasan_report+0x25b/0x340 [ 44.184897] __asan_report_store8_noabort+0x17/0x20 [ 44.185561] __internal_add_timer+0x275/0x2d0 [ 44.186174] ? calc_wheel_index+0x200/0x200 [ 44.186760] mod_timer+0x622/0x15b0 [ 44.187256] ? mod_timer_pending+0x14e0/0x14e0 [ 44.187867] ? __lock_is_held+0xb6/0x140 [ 44.188423] ? __lock_is_held+0xb6/0x140 [ 44.188972] ? __lockdep_init_map+0xe4/0x650 [ 44.189562] ? lockdep_init_map+0x9/0x10 [ 44.190107] ? init_timer_key+0x126/0x3b0 [ 44.190663] ? try_to_del_timer_sync+0x120/0x120 [ 44.191322] ? round_jiffies_up+0xce/0x100 [ 44.191939] ? __round_jiffies_up_relative+0x150/0x150 [ 44.192655] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 44.193310] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 44.194062] __tun_chr_ioctl+0x1b17/0x3d20 [ 44.194640] ? tun_chr_read_iter+0x1e0/0x1e0 [ 44.199013] ? find_held_lock+0x35/0x1d0 [ 44.203047] ? __might_sleep+0x95/0x190 [ 44.206985] ? handle_mm_fault+0x248/0x8d0 [ 44.211192] ? selinux_file_ioctl+0x444/0x690 [ 44.215651] ? __fget_light+0x297/0x380 [ 44.219590] ? selinux_capable+0x40/0x40 [ 44.223629] ? handle_mm_fault+0x410/0x8d0 [ 44.227835] tun_chr_compat_ioctl+0x29/0x30 [ 44.232122] ? tun_chr_compat_ioctl+0x29/0x30 [ 44.236584] compat_SyS_ioctl+0x1d7/0x3290 [ 44.240785] ? up_read+0x1a/0x40 [ 44.244119] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 44.248495] ? do_ioctl+0x60/0x60 [ 44.251918] ? do_fast_syscall_32+0x158/0xf05 [ 44.256382] ? do_ioctl+0x60/0x60 [ 44.259802] do_fast_syscall_32+0x3f2/0xf05 [ 44.264095] ? do_int80_syscall_32+0x940/0x940 [ 44.268644] ? kasan_check_read+0x11/0x20 [ 44.272758] ? syscall_return_slowpath+0x510/0x510 [ 44.277655] ? SyS_rt_sigaction+0x94/0x1b0 [ 44.281855] ? SyS_sigprocmask+0x4b0/0x4b0 [ 44.286054] ? SyS_read+0x184/0x220 [ 44.289647] ? retint_user+0x18/0x20 [ 44.293330] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.298144] entry_SYSENTER_compat+0x51/0x60 [ 44.302516] RIP: 0023:0xf7f14c79 [ 44.305844] RSP: 002b:00000000ffc340cc EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 44.313517] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 44.320751] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 44.327985] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 44.335219] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 44.342452] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 44.349704] [ 44.351297] Allocated by task 2989: [ 44.354891] save_stack_trace+0x16/0x20 [ 44.358826] save_stack+0x43/0xd0 [ 44.362243] kasan_kmalloc+0xad/0xe0 [ 44.365919] __kmalloc_node+0x47/0x70 [ 44.369683] kvmalloc_node+0x64/0xd0 [ 44.373360] alloc_netdev_mqs+0x16e/0xed0 [ 44.377474] __tun_chr_ioctl+0x12b2/0x3d20 [ 44.381671] tun_chr_compat_ioctl+0x29/0x30 [ 44.385955] compat_SyS_ioctl+0x1d7/0x3290 [ 44.390153] do_fast_syscall_32+0x3f2/0xf05 [ 44.394438] entry_SYSENTER_compat+0x51/0x60 [ 44.398808] [ 44.400400] Freed by task 2989: [ 44.403642] save_stack_trace+0x16/0x20 [ 44.407582] save_stack+0x43/0xd0 [ 44.410998] kasan_slab_free+0x71/0xc0 [ 44.414851] kfree+0xca/0x250 [ 44.417921] kvfree+0x36/0x60 [ 44.420989] free_netdev+0x2cf/0x360 [ 44.424668] __tun_chr_ioctl+0x2cea/0x3d20 [ 44.428865] tun_chr_compat_ioctl+0x29/0x30 [ 44.433150] compat_SyS_ioctl+0x1d7/0x3290 [ 44.437349] do_fast_syscall_32+0x3f2/0xf05 [ 44.441632] entry_SYSENTER_compat+0x51/0x60 [ 44.446000] [ 44.447592] The buggy address belongs to the object at ffff8801d1cd02c0 [ 44.447592] which belongs to the cache kmalloc-16384 of size 16384 [ 44.460559] The buggy address is located 13120 bytes inside of [ 44.460559] 16384-byte region [ffff8801d1cd02c0, ffff8801d1cd42c0) [ 44.472743] The buggy address belongs to the page: [ 44.477638] page:ffffea0007473400 count:1 mapcount:0 mapping:ffff8801d1cd02c0 index:0x0 compound_mapcount: 0 [ 44.487568] flags: 0x200000000008100(slab|head) [ 44.492203] raw: 0200000000008100 ffff8801d1cd02c0 0000000000000000 0000000100000001 [ 44.500049] raw: ffffea000701e020 ffffea0007462820 ffff8801dac02200 0000000000000000 [ 44.507890] page dumped because: kasan: bad access detected [ 44.513559] [ 44.515149] Memory state around the buggy address: [ 44.520041] ffff8801d1cd3500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.527362] ffff8801d1cd3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.534685] >ffff8801d1cd3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.542005] ^ [ 44.545335] ffff8801d1cd3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.552659] ffff8801d1cd3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 44.559979] ================================================================== [ 44.567298] Disabling lock debugging due to kernel taint [ 44.572708] Kernel panic - not syncing: panic_on_warn set ... [ 44.572708] [ 44.580035] CPU: 1 PID: 2989 Comm: syzkaller535947 Tainted: G B 4.14.0-rc5+ #52 [ 44.588572] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.597888] Call Trace: [ 44.600440] dump_stack+0x194/0x257 [ 44.604031] ? arch_local_irq_restore+0x53/0x53 [ 44.608664] ? kasan_end_report+0x32/0x50 [ 44.612777] ? lock_downgrade+0x990/0x990 [ 44.616889] ? __internal_add_timer+0x1f0/0x2d0 [ 44.621521] panic+0x1e4/0x417 [ 44.624676] ? __warn+0x1d9/0x1d9 [ 44.628097] ? __internal_add_timer+0x275/0x2d0 [ 44.632726] kasan_end_report+0x50/0x50 [ 44.636664] kasan_report+0x144/0x340 [ 44.640429] __asan_report_store8_noabort+0x17/0x20 [ 44.645405] __internal_add_timer+0x275/0x2d0 [ 44.649862] ? calc_wheel_index+0x200/0x200 [ 44.654153] mod_timer+0x622/0x15b0 [ 44.657747] ? mod_timer_pending+0x14e0/0x14e0 [ 44.662293] ? __lock_is_held+0xb6/0x140 [ 44.666322] ? __lock_is_held+0xb6/0x140 [ 44.670351] ? __lockdep_init_map+0xe4/0x650 [ 44.674723] ? lockdep_init_map+0x9/0x10 [ 44.678746] ? init_timer_key+0x126/0x3b0 [ 44.682857] ? try_to_del_timer_sync+0x120/0x120 [ 44.687578] ? round_jiffies_up+0xce/0x100 [ 44.691775] ? __round_jiffies_up_relative+0x150/0x150 [ 44.697013] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 44.701905] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 44.707408] __tun_chr_ioctl+0x1b17/0x3d20 [ 44.711612] ? tun_chr_read_iter+0x1e0/0x1e0 [ 44.715981] ? find_held_lock+0x35/0x1d0 [ 44.720008] ? __might_sleep+0x95/0x190 [ 44.723943] ? handle_mm_fault+0x248/0x8d0 [ 44.728144] ? selinux_file_ioctl+0x444/0x690 [ 44.732601] ? __fget_light+0x297/0x380 [ 44.736548] ? selinux_capable+0x40/0x40 [ 44.741048] ? handle_mm_fault+0x410/0x8d0 [ 44.745255] tun_chr_compat_ioctl+0x29/0x30 [ 44.749539] ? tun_chr_compat_ioctl+0x29/0x30 [ 44.753999] compat_SyS_ioctl+0x1d7/0x3290 [ 44.758195] ? up_read+0x1a/0x40 [ 44.761525] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 44.765895] ? do_ioctl+0x60/0x60 [ 44.769316] ? do_fast_syscall_32+0x158/0xf05 [ 44.773773] ? do_ioctl+0x60/0x60 [ 44.777188] do_fast_syscall_32+0x3f2/0xf05 [ 44.781476] ? do_int80_syscall_32+0x940/0x940 [ 44.786020] ? kasan_check_read+0x11/0x20 [ 44.790132] ? syscall_return_slowpath+0x510/0x510 [ 44.795028] ? SyS_rt_sigaction+0x94/0x1b0 [ 44.799226] ? SyS_sigprocmask+0x4b0/0x4b0 [ 44.803427] ? SyS_read+0x184/0x220 [ 44.807019] ? retint_user+0x18/0x20 [ 44.810699] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 44.815507] entry_SYSENTER_compat+0x51/0x60 [ 44.819876] RIP: 0023:0xf7f14c79 [ 44.823203] RSP: 002b:00000000ffc340cc EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 44.830874] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 44.838106] RDX: 0000000020927fd8 RSI: 0000000000000037 RDI: 0000000000000005 [ 44.845339] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 44.852572] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 44.859804] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 44.867078] Dumping ftrace buffer: [ 44.870582] (ftrace buffer empty) [ 44.874255] Kernel Offset: disabled [ 44.877845] Rebooting in 86400 seconds..