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-0,10.128.15.206' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 31.902365] ================================================================== [ 31.909792] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 31.916805] Write of size 8 at addr ffff8801ce0c36c8 by task syzkaller240339/2984 [ 31.924399] [ 31.926011] CPU: 0 PID: 2984 Comm: syzkaller240339 Not tainted 4.14.0-rc2+ #20 [ 31.933347] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.942676] Call Trace: [ 31.945236] dump_stack+0x194/0x257 [ 31.948860] ? arch_local_irq_restore+0x53/0x53 [ 31.953506] ? show_regs_print_info+0x65/0x65 [ 31.957979] ? __kernel_text_address+0xd/0x40 [ 31.962452] ? __internal_add_timer+0x275/0x2d0 [ 31.967102] print_address_description+0x73/0x250 [ 31.971921] ? __internal_add_timer+0x275/0x2d0 [ 31.976575] kasan_report+0x25b/0x340 [ 31.980354] __asan_report_store8_noabort+0x17/0x20 [ 31.985343] __internal_add_timer+0x275/0x2d0 [ 31.989814] ? calc_wheel_index+0x200/0x200 [ 31.994122] mod_timer+0x622/0x15b0 [ 31.997737] ? mod_timer_pending+0x14e0/0x14e0 [ 32.002296] ? __lock_is_held+0xbc/0x140 [ 32.006351] ? __lock_is_held+0xbc/0x140 [ 32.010398] ? __lockdep_init_map+0xe4/0x650 [ 32.014783] ? lockdep_init_map+0x3d/0x70 [ 32.018908] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.023899] ? init_timer_key+0x126/0x3b0 [ 32.028024] ? try_to_del_timer_sync+0x120/0x120 [ 32.032769] ? round_jiffies_up+0xce/0x100 [ 32.036982] ? __round_jiffies_up_relative+0x150/0x150 [ 32.042233] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.047140] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 32.052662] __tun_chr_ioctl+0x1b23/0x3d20 [ 32.056884] ? tun_chr_read_iter+0x1e0/0x1e0 [ 32.061264] ? quarantine_put+0x10f/0x190 [ 32.065397] ? __might_sleep+0x95/0x190 [ 32.069342] ? __fd_install+0x2f7/0x6a0 [ 32.073300] ? selinux_file_ioctl+0x444/0x690 [ 32.077765] ? __fget_light+0x29d/0x390 [ 32.081728] ? selinux_capable+0x40/0x40 [ 32.085767] ? putname+0xee/0x130 [ 32.089198] ? putname+0xee/0x130 [ 32.092627] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.097624] tun_chr_compat_ioctl+0x29/0x30 [ 32.101914] ? tun_chr_compat_ioctl+0x29/0x30 [ 32.106381] compat_SyS_ioctl+0x1d7/0x3290 [ 32.110590] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 32.114970] ? do_ioctl+0x60/0x60 [ 32.118395] ? do_fast_syscall_32+0x158/0xf05 [ 32.122862] ? do_ioctl+0x60/0x60 [ 32.126302] do_fast_syscall_32+0x3f2/0xf05 [ 32.130603] ? do_int80_syscall_32+0x940/0x940 [ 32.135167] ? kasan_check_read+0x11/0x20 [ 32.139294] ? syscall_return_slowpath+0x510/0x510 [ 32.144197] ? SyS_rt_sigaction+0x94/0x1b0 [ 32.148409] ? sysret32_from_system_call+0x5/0x3b [ 32.153227] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.158058] entry_SYSENTER_compat+0x51/0x60 [ 32.162437] RIP: 0023:0xf7fd2c79 [ 32.165782] RSP: 002b:00000000ff95ed9c EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 32.173464] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000400454ca [ 32.180705] RDX: 000000002044e000 RSI: 00000000080ef00c RDI: 000000000000003f [ 32.187944] RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000 [ 32.195185] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 32.202424] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 32.209690] [ 32.211288] Allocated by task 2984: [ 32.214888] save_stack_trace+0x16/0x20 [ 32.218831] save_stack+0x43/0xd0 [ 32.222253] kasan_kmalloc+0xad/0xe0 [ 32.225935] __kmalloc_node+0x47/0x70 [ 32.229705] kvmalloc_node+0x64/0xd0 [ 32.233388] alloc_netdev_mqs+0x16e/0xed0 [ 32.237503] __tun_chr_ioctl+0x12be/0x3d20 [ 32.241715] tun_chr_compat_ioctl+0x29/0x30 [ 32.246008] compat_SyS_ioctl+0x1d7/0x3290 [ 32.250436] do_fast_syscall_32+0x3f2/0xf05 [ 32.254732] entry_SYSENTER_compat+0x51/0x60 [ 32.259106] [ 32.260703] Freed by task 2984: [ 32.263955] save_stack_trace+0x16/0x20 [ 32.267899] save_stack+0x43/0xd0 [ 32.271320] kasan_slab_free+0x71/0xc0 [ 32.275177] kfree+0xca/0x250 [ 32.278251] kvfree+0x36/0x60 [ 32.281327] free_netdev+0x2cf/0x360 [ 32.285011] __tun_chr_ioctl+0x2cf6/0x3d20 [ 32.289215] tun_chr_compat_ioctl+0x29/0x30 [ 32.293506] compat_SyS_ioctl+0x1d7/0x3290 [ 32.297715] do_fast_syscall_32+0x3f2/0xf05 [ 32.302013] entry_SYSENTER_compat+0x51/0x60 [ 32.306388] [ 32.307987] The buggy address belongs to the object at ffff8801ce0c02c0 [ 32.307987] which belongs to the cache kmalloc-16384 of size 16384 [ 32.320959] The buggy address is located 13320 bytes inside of [ 32.320959] 16384-byte region [ffff8801ce0c02c0, ffff8801ce0c42c0) [ 32.333146] The buggy address belongs to the page: [ 32.338045] page:ffffea0007383000 count:1 mapcount:0 mapping:ffff8801ce0c02c0 index:0x0 compound_mapcount: 0 [ 32.347998] flags: 0x200000000008100(slab|head) [ 32.352637] raw: 0200000000008100 ffff8801ce0c02c0 0000000000000000 0000000100000001 [ 32.360499] raw: ffffea0007550c20 ffffea0007381c20 ffff8801dac02200 0000000000000000 [ 32.368360] page dumped because: kasan: bad access detected [ 32.374067] [ 32.375666] Memory state around the buggy address: [ 32.380566] ffff8801ce0c3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.387904] ffff8801ce0c3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.395232] >ffff8801ce0c3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.402558] ^ [ 32.408235] ffff8801ce0c3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.415562] ffff8801ce0c3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.422889] ================================================================== [ 32.430222] Disabling lock debugging due to kernel taint [ 32.435642] Kernel panic - not syncing: panic_on_warn set ... [ 32.435642] [ 32.442976] CPU: 0 PID: 2984 Comm: syzkaller240339 Tainted: G B 4.14.0-rc2+ #20 [ 32.451512] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.460842] Call Trace: [ 32.463396] dump_stack+0x194/0x257 [ 32.466990] ? arch_local_irq_restore+0x53/0x53 [ 32.471623] ? vprintk_default+0x28/0x30 [ 32.475652] ? __internal_add_timer+0x180/0x2d0 [ 32.480286] panic+0x1e4/0x417 [ 32.483443] ? __warn+0x1d9/0x1d9 [ 32.486866] ? __internal_add_timer+0x275/0x2d0 [ 32.491498] kasan_end_report+0x50/0x50 [ 32.495436] kasan_report+0x144/0x340 [ 32.499203] __asan_report_store8_noabort+0x17/0x20 [ 32.504182] __internal_add_timer+0x275/0x2d0 [ 32.508642] ? calc_wheel_index+0x200/0x200 [ 32.512936] mod_timer+0x622/0x15b0 [ 32.516533] ? mod_timer_pending+0x14e0/0x14e0 [ 32.521088] ? __lock_is_held+0xbc/0x140 [ 32.525123] ? __lock_is_held+0xbc/0x140 [ 32.529150] ? __lockdep_init_map+0xe4/0x650 [ 32.533526] ? lockdep_init_map+0x3d/0x70 [ 32.537638] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.542618] ? init_timer_key+0x126/0x3b0 [ 32.546730] ? try_to_del_timer_sync+0x120/0x120 [ 32.551449] ? round_jiffies_up+0xce/0x100 [ 32.555645] ? __round_jiffies_up_relative+0x150/0x150 [ 32.560886] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.565777] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 32.571283] __tun_chr_ioctl+0x1b23/0x3d20 [ 32.575487] ? tun_chr_read_iter+0x1e0/0x1e0 [ 32.579858] ? quarantine_put+0x10f/0x190 [ 32.583974] ? __might_sleep+0x95/0x190 [ 32.587911] ? __fd_install+0x2f7/0x6a0 [ 32.591860] ? selinux_file_ioctl+0x444/0x690 [ 32.596319] ? __fget_light+0x29d/0x390 [ 32.600257] ? selinux_capable+0x40/0x40 [ 32.604284] ? putname+0xee/0x130 [ 32.607703] ? putname+0xee/0x130 [ 32.611127] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.616112] tun_chr_compat_ioctl+0x29/0x30 [ 32.620397] ? tun_chr_compat_ioctl+0x29/0x30 [ 32.624859] compat_SyS_ioctl+0x1d7/0x3290 [ 32.629058] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 32.633435] ? do_ioctl+0x60/0x60 [ 32.636862] ? do_fast_syscall_32+0x158/0xf05 [ 32.641323] ? do_ioctl+0x60/0x60 [ 32.644743] do_fast_syscall_32+0x3f2/0xf05 [ 32.649035] ? do_int80_syscall_32+0x940/0x940 [ 32.653588] ? kasan_check_read+0x11/0x20 [ 32.657702] ? syscall_return_slowpath+0x510/0x510 [ 32.662596] ? SyS_rt_sigaction+0x94/0x1b0 [ 32.666800] ? sysret32_from_system_call+0x5/0x3b [ 32.671610] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 32.676420] entry_SYSENTER_compat+0x51/0x60 [ 32.680809] RIP: 0023:0xf7fd2c79 [ 32.684139] RSP: 002b:00000000ff95ed9c EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 32.691818] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000400454ca [ 32.699054] RDX: 000000002044e000 RSI: 00000000080ef00c RDI: 000000000000003f [ 32.706288] RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000 [ 32.713527] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 32.720771] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000