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.48' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 56.720219] ================================================================== [ 56.721388] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 56.722334] Write of size 8 at addr ffff8801d227b600 by task syzkaller972288/2979 [ 56.723347] [ 56.723598] CPU: 0 PID: 2979 Comm: syzkaller972288 Not tainted 4.14.0-rc5+ #47 [ 56.724563] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 56.725793] Call Trace: [ 56.726153] dump_stack+0x194/0x257 [ 56.726671] ? arch_local_irq_restore+0x53/0x53 [ 56.727295] ? show_regs_print_info+0x65/0x65 [ 56.727915] ? __kernel_text_address+0xd/0x40 [ 56.728516] ? __internal_add_timer+0x275/0x2d0 [ 56.729140] print_address_description+0x73/0x250 [ 56.729785] ? __internal_add_timer+0x275/0x2d0 [ 56.730407] kasan_report+0x25b/0x340 [ 56.730926] __asan_report_store8_noabort+0x17/0x20 [ 56.731604] __internal_add_timer+0x275/0x2d0 [ 56.732226] ? calc_wheel_index+0x200/0x200 [ 56.732813] mod_timer+0x622/0x15b0 [ 56.733312] ? mod_timer_pending+0x14e0/0x14e0 [ 56.733958] ? __lock_is_held+0xb6/0x140 [ 56.734519] ? __lock_is_held+0xb6/0x140 [ 56.735069] ? __lockdep_init_map+0xe4/0x650 [ 56.735678] ? lockdep_init_map+0x9/0x10 [ 56.736222] ? init_timer_key+0x126/0x3b0 [ 56.736796] ? try_to_del_timer_sync+0x120/0x120 [ 56.737434] ? round_jiffies_up+0xce/0x100 [ 56.738002] ? __round_jiffies_up_relative+0x150/0x150 [ 56.738708] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 56.739426] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 56.740197] __tun_chr_ioctl+0x1b17/0x3d20 [ 56.742700] ? tun_chr_read_iter+0x1e0/0x1e0 [ 56.747075] ? find_held_lock+0x35/0x1d0 [ 56.751113] ? __might_sleep+0x95/0x190 [ 56.755063] ? handle_mm_fault+0x248/0x8d0 [ 56.759275] ? selinux_file_ioctl+0x444/0x690 [ 56.763738] ? __fget_light+0x297/0x380 [ 56.767692] ? selinux_capable+0x40/0x40 [ 56.771731] ? handle_mm_fault+0x410/0x8d0 [ 56.775947] tun_chr_compat_ioctl+0x29/0x30 [ 56.780240] ? tun_chr_compat_ioctl+0x29/0x30 [ 56.784708] compat_SyS_ioctl+0x1d7/0x3290 [ 56.788910] ? up_read+0x1a/0x40 [ 56.792245] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 56.796623] ? do_ioctl+0x60/0x60 [ 56.800048] ? do_fast_syscall_32+0x158/0xf05 [ 56.804519] ? do_ioctl+0x60/0x60 [ 56.807941] do_fast_syscall_32+0x3f2/0xf05 [ 56.812237] ? do_int80_syscall_32+0x940/0x940 [ 56.816793] ? kasan_check_read+0x11/0x20 [ 56.820912] ? syscall_return_slowpath+0x510/0x510 [ 56.825812] ? SyS_rt_sigaction+0x94/0x1b0 [ 56.830014] ? SyS_sigprocmask+0x4b0/0x4b0 [ 56.834221] ? SyS_read+0x184/0x220 [ 56.837819] ? retint_user+0x18/0x20 [ 56.841506] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 56.846321] entry_SYSENTER_compat+0x51/0x60 [ 56.850698] RIP: 0023:0xf7f05c79 [ 56.854029] RSP: 002b:00000000ffc61fec EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 56.861707] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 56.868944] RDX: 000000002050ffd8 RSI: 0000000000000029 RDI: 0000000000000005 [ 56.876180] RBP: 00000000ffc62048 R08: 0000000000000000 R09: 0000000000000000 [ 56.883418] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 56.890655] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 56.897911] [ 56.899505] Allocated by task 2979: [ 56.903104] save_stack_trace+0x16/0x20 [ 56.907050] save_stack+0x43/0xd0 [ 56.910479] kasan_kmalloc+0xad/0xe0 [ 56.914160] __kmalloc_node+0x47/0x70 [ 56.917930] kvmalloc_node+0x64/0xd0 [ 56.921612] alloc_netdev_mqs+0x16e/0xed0 [ 56.925730] __tun_chr_ioctl+0x12b2/0x3d20 [ 56.929930] tun_chr_compat_ioctl+0x29/0x30 [ 56.934220] compat_SyS_ioctl+0x1d7/0x3290 [ 56.938424] do_fast_syscall_32+0x3f2/0xf05 [ 56.942717] entry_SYSENTER_compat+0x51/0x60 [ 56.947089] [ 56.948682] Freed by task 2979: [ 56.951928] save_stack_trace+0x16/0x20 [ 56.955869] save_stack+0x43/0xd0 [ 56.959286] kasan_slab_free+0x71/0xc0 [ 56.963137] kfree+0xca/0x250 [ 56.966209] kvfree+0x36/0x60 [ 56.969282] free_netdev+0x2cf/0x360 [ 56.972963] __tun_chr_ioctl+0x2cea/0x3d20 [ 56.977164] tun_chr_compat_ioctl+0x29/0x30 [ 56.981454] compat_SyS_ioctl+0x1d7/0x3290 [ 56.985656] do_fast_syscall_32+0x3f2/0xf05 [ 56.989944] entry_SYSENTER_compat+0x51/0x60 [ 56.994314] [ 56.995910] The buggy address belongs to the object at ffff8801d22782c0 [ 56.995910] which belongs to the cache kmalloc-16384 of size 16384 [ 57.008882] The buggy address is located 13120 bytes inside of [ 57.008882] 16384-byte region [ffff8801d22782c0, ffff8801d227c2c0) [ 57.021068] The buggy address belongs to the page: [ 57.025964] page:ffffea0007489e00 count:1 mapcount:0 mapping:ffff8801d22782c0 index:0x0 compound_mapcount: 0 [ 57.035898] flags: 0x200000000008100(slab|head) [ 57.040536] raw: 0200000000008100 ffff8801d22782c0 0000000000000000 0000000100000001 [ 57.048383] raw: ffffea00072ede20 ffffea0007488420 ffff8801dac02200 0000000000000000 [ 57.056229] page dumped because: kasan: bad access detected [ 57.061904] [ 57.063499] Memory state around the buggy address: [ 57.068397] ffff8801d227b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.075726] ffff8801d227b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.083052] >ffff8801d227b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.090376] ^ [ 57.093708] ffff8801d227b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.101033] ffff8801d227b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.108361] ================================================================== [ 57.115684] Disabling lock debugging due to kernel taint [ 57.121103] Kernel panic - not syncing: panic_on_warn set ... [ 57.121103] [ 57.128430] CPU: 0 PID: 2979 Comm: syzkaller972288 Tainted: G B 4.14.0-rc5+ #47 [ 57.136969] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.146375] Call Trace: [ 57.148953] dump_stack+0x194/0x257 [ 57.152551] ? arch_local_irq_restore+0x53/0x53 [ 57.157186] ? kasan_end_report+0x32/0x50 [ 57.161305] ? lock_downgrade+0x990/0x990 [ 57.165422] ? __internal_add_timer+0x1c0/0x2d0 [ 57.170058] panic+0x1e4/0x417 [ 57.173214] ? __warn+0x1d9/0x1d9 [ 57.176647] ? __internal_add_timer+0x275/0x2d0 [ 57.181281] kasan_end_report+0x50/0x50 [ 57.185218] kasan_report+0x144/0x340 [ 57.188984] __asan_report_store8_noabort+0x17/0x20 [ 57.193964] __internal_add_timer+0x275/0x2d0 [ 57.198426] ? calc_wheel_index+0x200/0x200 [ 57.202716] mod_timer+0x622/0x15b0 [ 57.206313] ? mod_timer_pending+0x14e0/0x14e0 [ 57.210860] ? __lock_is_held+0xb6/0x140 [ 57.214895] ? __lock_is_held+0xb6/0x140 [ 57.218924] ? __lockdep_init_map+0xe4/0x650 [ 57.223300] ? lockdep_init_map+0x9/0x10 [ 57.227327] ? init_timer_key+0x126/0x3b0 [ 57.231445] ? try_to_del_timer_sync+0x120/0x120 [ 57.236167] ? round_jiffies_up+0xce/0x100 [ 57.240378] ? __round_jiffies_up_relative+0x150/0x150 [ 57.245619] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 57.250514] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 57.256022] __tun_chr_ioctl+0x1b17/0x3d20 [ 57.260225] ? tun_chr_read_iter+0x1e0/0x1e0 [ 57.264601] ? find_held_lock+0x35/0x1d0 [ 57.268634] ? __might_sleep+0x95/0x190 [ 57.272576] ? handle_mm_fault+0x248/0x8d0 [ 57.276778] ? selinux_file_ioctl+0x444/0x690 [ 57.281238] ? __fget_light+0x297/0x380 [ 57.285178] ? selinux_capable+0x40/0x40 [ 57.289208] ? handle_mm_fault+0x410/0x8d0 [ 57.293412] tun_chr_compat_ioctl+0x29/0x30 [ 57.297697] ? tun_chr_compat_ioctl+0x29/0x30 [ 57.302186] compat_SyS_ioctl+0x1d7/0x3290 [ 57.306386] ? up_read+0x1a/0x40 [ 57.309716] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 57.314091] ? do_ioctl+0x60/0x60 [ 57.317516] ? do_fast_syscall_32+0x158/0xf05 [ 57.321990] ? do_ioctl+0x60/0x60 [ 57.325412] do_fast_syscall_32+0x3f2/0xf05 [ 57.329704] ? do_int80_syscall_32+0x940/0x940 [ 57.334264] ? kasan_check_read+0x11/0x20 [ 57.338383] ? syscall_return_slowpath+0x510/0x510 [ 57.343282] ? SyS_rt_sigaction+0x94/0x1b0 [ 57.347486] ? SyS_sigprocmask+0x4b0/0x4b0 [ 57.351687] ? SyS_read+0x184/0x220 [ 57.355281] ? retint_user+0x18/0x20 [ 57.358964] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 57.363778] entry_SYSENTER_compat+0x51/0x60 [ 57.368152] RIP: 0023:0xf7f05c79 [ 57.371483] RSP: 002b:00000000ffc61fec EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 57.379154] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000400454ca [ 57.386390] RDX: 000000002050ffd8 RSI: 0000000000000029 RDI: 0000000000000005 [ 57.393626] RBP: 00000000ffc62048 R08: 0000000000000000 R09: 0000000000000000 [ 57.400864] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 57.408102] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000