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-1,10.128.0.32' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 45.660528] ================================================================== [ 45.661687] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 45.662698] Write of size 8 at addr ffff8801ce193688 by task syzkaller346169/2984 [ 45.663794] [ 45.664049] CPU: 0 PID: 2984 Comm: syzkaller346169 Not tainted 4.14.0-rc2+ #20 [ 45.665017] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.666252] Call Trace: [ 45.666616] dump_stack+0x194/0x257 [ 45.667123] ? arch_local_irq_restore+0x53/0x53 [ 45.667753] ? show_regs_print_info+0x65/0x65 [ 45.668362] ? __kernel_text_address+0xd/0x40 [ 45.668967] ? __internal_add_timer+0x275/0x2d0 [ 45.669594] print_address_description+0x73/0x250 [ 45.670243] ? __internal_add_timer+0x275/0x2d0 [ 45.670869] kasan_report+0x25b/0x340 [ 45.671388] __asan_report_store8_noabort+0x17/0x20 [ 45.672056] __internal_add_timer+0x275/0x2d0 [ 45.672854] ? calc_wheel_index+0x200/0x200 [ 45.673457] mod_timer+0x622/0x15b0 [ 45.673988] ? mod_timer_pending+0x14e0/0x14e0 [ 45.674639] ? __lock_is_held+0xbc/0x140 [ 45.675302] ? __lock_is_held+0xbc/0x140 [ 45.675900] ? __lockdep_init_map+0xe4/0x650 [ 45.676545] ? lockdep_init_map+0x3d/0x70 [ 45.677121] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.677831] ? init_timer_key+0x126/0x3b0 [ 45.678434] ? try_to_del_timer_sync+0x120/0x120 [ 45.679080] ? round_jiffies_up+0xce/0x100 [ 45.679669] ? __round_jiffies_up_relative+0x150/0x150 [ 45.680371] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 45.683328] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 45.688845] __tun_chr_ioctl+0x1b23/0x3d20 [ 45.693064] ? tun_chr_read_iter+0x1e0/0x1e0 [ 45.697450] ? __pmd_alloc+0x4e0/0x4e0 [ 45.701318] ? __might_sleep+0x95/0x190 [ 45.705274] ? selinux_file_ioctl+0x444/0x690 [ 45.710203] ? __fget_light+0x29d/0x390 [ 45.714153] ? selinux_capable+0x40/0x40 [ 45.718211] tun_chr_compat_ioctl+0x29/0x30 [ 45.722503] ? tun_chr_compat_ioctl+0x29/0x30 [ 45.726974] compat_SyS_ioctl+0x1d7/0x3290 [ 45.731180] ? __handle_mm_fault+0x39c0/0x39c0 [ 45.735733] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 45.740118] ? do_ioctl+0x60/0x60 [ 45.743547] ? do_fast_syscall_32+0x158/0xf05 [ 45.748015] ? do_ioctl+0x60/0x60 [ 45.751443] do_fast_syscall_32+0x3f2/0xf05 [ 45.755743] ? do_int80_syscall_32+0x940/0x940 [ 45.760299] ? kasan_check_read+0x11/0x20 [ 45.764420] ? syscall_return_slowpath+0x510/0x510 [ 45.769322] ? SyS_rt_sigaction+0x94/0x1b0 [ 45.773534] ? lockdep_sys_exit+0x47/0xf0 [ 45.777653] ? retint_user+0x18/0x20 [ 45.781341] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 45.786164] entry_SYSENTER_compat+0x51/0x60 [ 45.790543] RIP: 0023:0xf7feec79 [ 45.793886] RSP: 002b:00000000ffdce1fc EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 45.801568] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000400454ca [ 45.808810] RDX: 0000000020b28000 RSI: 00000000080ef00c RDI: 000000000000003f [ 45.816051] RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000 [ 45.823295] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 45.830535] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 45.837795] [ 45.839394] Allocated by task 2984: [ 45.842993] save_stack_trace+0x16/0x20 [ 45.846940] save_stack+0x43/0xd0 [ 45.850364] kasan_kmalloc+0xad/0xe0 [ 45.854046] __kmalloc_node+0x47/0x70 [ 45.857818] kvmalloc_node+0x64/0xd0 [ 45.861505] alloc_netdev_mqs+0x16e/0xed0 [ 45.865626] __tun_chr_ioctl+0x12be/0x3d20 [ 45.869832] tun_chr_compat_ioctl+0x29/0x30 [ 45.874123] compat_SyS_ioctl+0x1d7/0x3290 [ 45.878328] do_fast_syscall_32+0x3f2/0xf05 [ 45.882618] entry_SYSENTER_compat+0x51/0x60 [ 45.886996] [ 45.888594] Freed by task 2984: [ 45.891844] save_stack_trace+0x16/0x20 [ 45.895789] save_stack+0x43/0xd0 [ 45.899210] kasan_slab_free+0x71/0xc0 [ 45.903067] kfree+0xca/0x250 [ 45.906141] kvfree+0x36/0x60 [ 45.909215] free_netdev+0x2cf/0x360 [ 45.912906] __tun_chr_ioctl+0x2cf6/0x3d20 [ 45.917108] tun_chr_compat_ioctl+0x29/0x30 [ 45.921400] compat_SyS_ioctl+0x1d7/0x3290 [ 45.925603] do_fast_syscall_32+0x3f2/0xf05 [ 45.929912] entry_SYSENTER_compat+0x51/0x60 [ 45.934288] [ 45.935888] The buggy address belongs to the object at ffff8801ce190280 [ 45.935888] which belongs to the cache kmalloc-16384 of size 16384 [ 45.948860] The buggy address is located 13320 bytes inside of [ 45.948860] 16384-byte region [ffff8801ce190280, ffff8801ce194280) [ 45.961049] The buggy address belongs to the page: [ 45.965948] page:ffffea0007386400 count:1 mapcount:0 mapping:ffff8801ce190280 index:0x0 compound_mapcount: 0 [ 45.975894] flags: 0x200000000008100(slab|head) [ 45.980534] raw: 0200000000008100 ffff8801ce190280 0000000000000000 0000000100000001 [ 45.988386] raw: ffffea000756fe20 ffffea0007382020 ffff8801dac02200 0000000000000000 [ 45.996238] page dumped because: kasan: bad access detected [ 46.001915] [ 46.003510] Memory state around the buggy address: [ 46.008407] ffff8801ce193580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.015737] ffff8801ce193600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.023065] >ffff8801ce193680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.030394] ^ [ 46.033991] ffff8801ce193700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.041320] ffff8801ce193780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.048658] ================================================================== [ 46.055983] Disabling lock debugging due to kernel taint [ 46.061396] Kernel panic - not syncing: panic_on_warn set ... [ 46.061396] [ 46.068723] CPU: 0 PID: 2984 Comm: syzkaller346169 Tainted: G B 4.14.0-rc2+ #20 [ 46.077259] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.086579] Call Trace: [ 46.089133] dump_stack+0x194/0x257 [ 46.092727] ? arch_local_irq_restore+0x53/0x53 [ 46.097362] ? vprintk_default+0x28/0x30 [ 46.101391] ? __internal_add_timer+0x180/0x2d0 [ 46.106029] panic+0x1e4/0x417 [ 46.109187] ? __warn+0x1d9/0x1d9 [ 46.112612] ? __internal_add_timer+0x275/0x2d0 [ 46.117247] kasan_end_report+0x50/0x50 [ 46.121186] kasan_report+0x144/0x340 [ 46.124953] __asan_report_store8_noabort+0x17/0x20 [ 46.129933] __internal_add_timer+0x275/0x2d0 [ 46.134395] ? calc_wheel_index+0x200/0x200 [ 46.138688] mod_timer+0x622/0x15b0 [ 46.142284] ? mod_timer_pending+0x14e0/0x14e0 [ 46.146831] ? __lock_is_held+0xbc/0x140 [ 46.150865] ? __lock_is_held+0xbc/0x140 [ 46.154891] ? __lockdep_init_map+0xe4/0x650 [ 46.159266] ? lockdep_init_map+0x3d/0x70 [ 46.163379] ? rcu_read_lock_sched_held+0x108/0x120 [ 46.168358] ? init_timer_key+0x126/0x3b0 [ 46.172472] ? try_to_del_timer_sync+0x120/0x120 [ 46.177193] ? round_jiffies_up+0xce/0x100 [ 46.181393] ? __round_jiffies_up_relative+0x150/0x150 [ 46.186647] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 46.191541] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 46.197047] __tun_chr_ioctl+0x1b23/0x3d20 [ 46.201252] ? tun_chr_read_iter+0x1e0/0x1e0 [ 46.205625] ? __pmd_alloc+0x4e0/0x4e0 [ 46.209479] ? __might_sleep+0x95/0x190 [ 46.213423] ? selinux_file_ioctl+0x444/0x690 [ 46.217879] ? __fget_light+0x29d/0x390 [ 46.221817] ? selinux_capable+0x40/0x40 [ 46.225851] tun_chr_compat_ioctl+0x29/0x30 [ 46.230144] ? tun_chr_compat_ioctl+0x29/0x30 [ 46.234603] compat_SyS_ioctl+0x1d7/0x3290 [ 46.238801] ? __handle_mm_fault+0x39c0/0x39c0 [ 46.243346] ? __tun_chr_ioctl+0x3d20/0x3d20 [ 46.247722] ? do_ioctl+0x60/0x60 [ 46.251142] ? do_fast_syscall_32+0x158/0xf05 [ 46.255603] ? do_ioctl+0x60/0x60 [ 46.259021] do_fast_syscall_32+0x3f2/0xf05 [ 46.263309] ? do_int80_syscall_32+0x940/0x940 [ 46.267856] ? kasan_check_read+0x11/0x20 [ 46.271970] ? syscall_return_slowpath+0x510/0x510 [ 46.276864] ? SyS_rt_sigaction+0x94/0x1b0 [ 46.281063] ? lockdep_sys_exit+0x47/0xf0 [ 46.285176] ? retint_user+0x18/0x20 [ 46.288857] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 46.293669] entry_SYSENTER_compat+0x51/0x60 [ 46.298041] RIP: 0023:0xf7feec79 [ 46.301369] RSP: 002b:00000000ffdce1fc EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 46.309042] RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000400454ca [ 46.316276] RDX: 0000000020b28000 RSI: 00000000080ef00c RDI: 000000000000003f [ 46.323511] RBP: 0000000000001000 R08: 0000000000000000 R09: 0000000000000000 [ 46.330747] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 46.337982] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000