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-3,10.128.0.12' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 51.021406] ================================================================== [ 51.022603] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 51.023526] Write of size 8 at addr ffff8801d052b640 by task syzkaller471772/3004 [ 51.024544] [ 51.024803] CPU: 1 PID: 3004 Comm: syzkaller471772 Not tainted 4.13.0-rc7+ #60 [ 51.025788] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.027024] Call Trace: [ 51.027383] dump_stack+0x194/0x257 [ 51.027875] ? arch_local_irq_restore+0x53/0x53 [ 51.028543] ? show_regs_print_info+0x65/0x65 [ 51.029206] ? __kernel_text_address+0xae/0xe0 [ 51.029819] ? __internal_add_timer+0x275/0x2d0 [ 51.030447] print_address_description+0x73/0x250 [ 51.031111] ? __internal_add_timer+0x275/0x2d0 [ 51.031744] kasan_report+0x24e/0x340 [ 51.032277] __asan_report_store8_noabort+0x17/0x20 [ 51.032943] __internal_add_timer+0x275/0x2d0 [ 51.033557] ? calc_wheel_index+0x200/0x200 [ 51.034144] mod_timer+0x622/0x15b0 [ 51.034641] ? mod_timer_pending+0x14e0/0x14e0 [ 51.035254] ? __lock_is_held+0xb6/0x140 [ 51.035812] ? __lock_is_held+0xb6/0x140 [ 51.036364] ? lockdep_init_map+0xe4/0x650 [ 51.036934] ? init_timer_key+0x126/0x3b0 [ 51.037492] ? try_to_del_timer_sync+0x120/0x120 [ 51.038158] ? round_jiffies_up+0xce/0x100 [ 51.038745] ? __round_jiffies_up_relative+0x150/0x150 [ 51.039458] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 51.040127] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 51.040872] __tun_chr_ioctl+0x1b20/0x3d60 [ 51.041440] ? unwind_dump+0x4/0x4c0 [ 51.044249] ? tun_select_queue+0x580/0x580 [ 51.048544] ? check_noncircular+0x20/0x20 [ 51.052748] ? save_stack+0xa3/0xd0 [ 51.056350] ? __handle_mm_fault+0x577/0x3860 [ 51.060813] ? check_noncircular+0x20/0x20 [ 51.065021] ? check_noncircular+0x20/0x20 [ 51.069226] ? __pmd_alloc+0x4e0/0x4e0 [ 51.073107] ? check_same_owner+0x320/0x320 [ 51.077396] ? handle_mm_fault+0x23e/0x860 [ 51.081603] ? tun_chr_compat_ioctl+0x30/0x30 [ 51.086065] tun_chr_ioctl+0x2a/0x40 [ 51.090248] ? tun_chr_ioctl+0x2a/0x40 [ 51.094111] do_vfs_ioctl+0x1b1/0x1520 [ 51.097972] ? ioctl_preallocate+0x2b0/0x2b0 [ 51.102354] ? selinux_capable+0x40/0x40 [ 51.106389] ? __handle_mm_fault+0x3860/0x3860 [ 51.110950] ? security_file_ioctl+0x7d/0xb0 [ 51.115325] ? security_file_ioctl+0x89/0xb0 [ 51.119705] SyS_ioctl+0x8f/0xc0 [ 51.123044] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.127766] RIP: 0033:0x443d99 [ 51.130937] RSP: 002b:00007ffd8e56f968 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 51.138614] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 51.145852] RDX: 000000002068d000 RSI: 00000000400454ca RDI: 0000000000000004 [ 51.153090] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 51.160326] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000401a80 [ 51.167563] R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000 [ 51.174815] [ 51.176411] Allocated by task 3004: [ 51.180007] save_stack_trace+0x16/0x20 [ 51.183949] save_stack+0x43/0xd0 [ 51.187366] kasan_kmalloc+0xad/0xe0 [ 51.191045] __kmalloc_node+0x47/0x70 [ 51.194813] kvmalloc_node+0x64/0xd0 [ 51.198493] alloc_netdev_mqs+0x16e/0xed0 [ 51.202610] __tun_chr_ioctl+0x12b2/0x3d60 [ 51.206808] tun_chr_ioctl+0x2a/0x40 [ 51.210489] do_vfs_ioctl+0x1b1/0x1520 [ 51.214339] SyS_ioctl+0x8f/0xc0 [ 51.217673] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.222394] [ 51.223988] Freed by task 3004: [ 51.227234] save_stack_trace+0x16/0x20 [ 51.231174] save_stack+0x43/0xd0 [ 51.234594] kasan_slab_free+0x71/0xc0 [ 51.238448] kfree+0xca/0x250 [ 51.241522] kvfree+0x36/0x60 [ 51.244594] free_netdev+0x2cf/0x360 [ 51.248277] __tun_chr_ioctl+0x2d24/0x3d60 [ 51.252490] tun_chr_ioctl+0x2a/0x40 [ 51.256169] do_vfs_ioctl+0x1b1/0x1520 [ 51.260021] SyS_ioctl+0x8f/0xc0 [ 51.263351] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.268068] [ 51.269663] The buggy address belongs to the object at ffff8801d0528300 [ 51.269663] which belongs to the cache kmalloc-16384 of size 16384 [ 51.282628] The buggy address is located 13120 bytes inside of [ 51.282628] 16384-byte region [ffff8801d0528300, ffff8801d052c300) [ 51.294811] The buggy address belongs to the page: [ 51.299705] page:ffffea0007414a00 count:1 mapcount:0 mapping:ffff8801d0528300 index:0x0 compound_mapcount: 0 [ 51.309638] flags: 0x200000000008100(slab|head) [ 51.314275] raw: 0200000000008100 ffff8801d0528300 0000000000000000 0000000100000001 [ 51.322135] raw: ffffea000761b020 ffffea0007436c20 ffff8801dac02200 0000000000000000 [ 51.329978] page dumped because: kasan: bad access detected [ 51.335651] [ 51.337245] Memory state around the buggy address: [ 51.342138] ffff8801d052b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.349462] ffff8801d052b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.356784] >ffff8801d052b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.364105] ^ [ 51.369519] ffff8801d052b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.376842] ffff8801d052b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.384163] ================================================================== [ 51.391485] Disabling lock debugging due to kernel taint [ 51.396898] Kernel panic - not syncing: panic_on_warn set ... [ 51.396898] [ 51.404226] CPU: 1 PID: 3004 Comm: syzkaller471772 Tainted: G B 4.13.0-rc7+ #60 [ 51.412762] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.422080] Call Trace: [ 51.424636] dump_stack+0x194/0x257 [ 51.428240] ? arch_local_irq_restore+0x53/0x53 [ 51.432890] ? kasan_end_report+0x32/0x50 [ 51.437004] ? lock_downgrade+0x990/0x990 [ 51.441120] ? __internal_add_timer+0x190/0x2d0 [ 51.445752] panic+0x1e4/0x417 [ 51.448910] ? __warn+0x1d9/0x1d9 [ 51.452337] ? __internal_add_timer+0x275/0x2d0 [ 51.456971] kasan_end_report+0x50/0x50 [ 51.460910] kasan_report+0x137/0x340 [ 51.464676] __asan_report_store8_noabort+0x17/0x20 [ 51.469656] __internal_add_timer+0x275/0x2d0 [ 51.474117] ? calc_wheel_index+0x200/0x200 [ 51.478407] mod_timer+0x622/0x15b0 [ 51.482002] ? mod_timer_pending+0x14e0/0x14e0 [ 51.486547] ? __lock_is_held+0xb6/0x140 [ 51.490578] ? __lock_is_held+0xb6/0x140 [ 51.494606] ? lockdep_init_map+0xe4/0x650 [ 51.498806] ? init_timer_key+0x126/0x3b0 [ 51.502918] ? try_to_del_timer_sync+0x120/0x120 [ 51.507638] ? round_jiffies_up+0xce/0x100 [ 51.511837] ? __round_jiffies_up_relative+0x150/0x150 [ 51.517081] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 51.521977] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 51.527489] __tun_chr_ioctl+0x1b20/0x3d60 [ 51.531688] ? unwind_dump+0x4/0x4c0 [ 51.535369] ? tun_select_queue+0x580/0x580 [ 51.539658] ? check_noncircular+0x20/0x20 [ 51.543859] ? save_stack+0xa3/0xd0 [ 51.547455] ? __handle_mm_fault+0x577/0x3860 [ 51.551915] ? check_noncircular+0x20/0x20 [ 51.556116] ? check_noncircular+0x20/0x20 [ 51.560314] ? __pmd_alloc+0x4e0/0x4e0 [ 51.564174] ? check_same_owner+0x320/0x320 [ 51.568458] ? handle_mm_fault+0x23e/0x860 [ 51.572657] ? tun_chr_compat_ioctl+0x30/0x30 [ 51.577116] tun_chr_ioctl+0x2a/0x40 [ 51.580794] ? tun_chr_ioctl+0x2a/0x40 [ 51.584645] do_vfs_ioctl+0x1b1/0x1520 [ 51.588500] ? ioctl_preallocate+0x2b0/0x2b0 [ 51.592874] ? selinux_capable+0x40/0x40 [ 51.597857] ? __handle_mm_fault+0x3860/0x3860 [ 51.602409] ? security_file_ioctl+0x7d/0xb0 [ 51.606779] ? security_file_ioctl+0x89/0xb0 [ 51.611152] SyS_ioctl+0x8f/0xc0 [ 51.614486] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.619208] RIP: 0033:0x443d99 [ 51.622363] RSP: 002b:00007ffd8e56f968 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 51.630035] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 51.637269] RDX: 000000002068d000 RSI: 00000000400454ca RDI: 0000000000000004 [ 51.644503] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 51.651736] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000401a80 [ 51.658971] R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000