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-7,10.128.0.25' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 32.045169] ================================================================== [ 32.052613] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 32.059601] Write of size 8 at addr ffff8801ce0636c8 by task syzkaller955032/2985 [ 32.067193] [ 32.068799] CPU: 0 PID: 2985 Comm: syzkaller955032 Not tainted 4.14.0-rc3+ #119 [ 32.076221] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.085550] Call Trace: [ 32.088117] dump_stack+0x194/0x257 [ 32.091727] ? arch_local_irq_restore+0x53/0x53 [ 32.096462] ? show_regs_print_info+0x65/0x65 [ 32.100940] ? __kernel_text_address+0xd/0x40 [ 32.105409] ? __internal_add_timer+0x275/0x2d0 [ 32.110053] print_address_description+0x73/0x250 [ 32.114868] ? __internal_add_timer+0x275/0x2d0 [ 32.119507] kasan_report+0x25b/0x340 [ 32.123285] __asan_report_store8_noabort+0x17/0x20 [ 32.128274] __internal_add_timer+0x275/0x2d0 [ 32.132743] ? calc_wheel_index+0x200/0x200 [ 32.137048] mod_timer+0x622/0x15b0 [ 32.140656] ? mod_timer_pending+0x14e0/0x14e0 [ 32.145207] ? __lock_is_held+0xbc/0x140 [ 32.149253] ? __lock_is_held+0xbc/0x140 [ 32.153287] ? __lockdep_init_map+0xe4/0x650 [ 32.157671] ? lockdep_init_map+0x3d/0x70 [ 32.161793] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.166778] ? init_timer_key+0x126/0x3b0 [ 32.170902] ? try_to_del_timer_sync+0x120/0x120 [ 32.175632] ? round_jiffies_up+0xce/0x100 [ 32.179837] ? __round_jiffies_up_relative+0x150/0x150 [ 32.185085] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.189986] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 32.195503] __tun_chr_ioctl+0x1b23/0x3d20 [ 32.199718] ? tun_chr_read_iter+0x1e0/0x1e0 [ 32.204107] ? lock_downgrade+0x990/0x990 [ 32.208338] ? handle_mm_fault+0x410/0x8d0 [ 32.212550] ? __do_page_fault+0x31e/0xd60 [ 32.216767] ? check_same_owner+0x320/0x320 [ 32.221060] ? up_read+0x1a/0x40 [ 32.224402] ? __do_page_fault+0x3d6/0xd60 [ 32.228610] ? tun_chr_compat_ioctl+0x30/0x30 [ 32.233076] tun_chr_ioctl+0x2a/0x40 [ 32.236760] ? tun_chr_ioctl+0x2a/0x40 [ 32.240621] do_vfs_ioctl+0x1b1/0x1530 [ 32.244486] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.248868] ? selinux_capable+0x40/0x40 [ 32.252903] ? putname+0xf3/0x130 [ 32.256330] ? do_sys_open+0x320/0x6d0 [ 32.260200] ? security_file_ioctl+0x89/0xb0 [ 32.264584] SyS_ioctl+0x8f/0xc0 [ 32.267930] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.272657] RIP: 0033:0x443d99 [ 32.275818] RSP: 002b:00007ffc3c921fa8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 32.283504] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 32.290746] RDX: 0000000020927fd8 RSI: 00000000400454ca RDI: 0000000000000006 [ 32.297987] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 32.305229] R10: 0000000000000000 R11: 0000000000000207 R12: 0000000000401a80 [ 32.312472] R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000 [ 32.319731] [ 32.321330] Allocated by task 2985: [ 32.324939] save_stack_trace+0x16/0x20 [ 32.328883] save_stack+0x43/0xd0 [ 32.332305] kasan_kmalloc+0xad/0xe0 [ 32.335989] __kmalloc_node+0x47/0x70 [ 32.339760] kvmalloc_node+0x64/0xd0 [ 32.343444] alloc_netdev_mqs+0x16e/0xed0 [ 32.347562] __tun_chr_ioctl+0x12be/0x3d20 [ 32.351764] tun_chr_ioctl+0x2a/0x40 [ 32.355448] do_vfs_ioctl+0x1b1/0x1530 [ 32.359305] SyS_ioctl+0x8f/0xc0 [ 32.362642] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.367367] [ 32.368964] Freed by task 2985: [ 32.372211] save_stack_trace+0x16/0x20 [ 32.376156] save_stack+0x43/0xd0 [ 32.379580] kasan_slab_free+0x71/0xc0 [ 32.383439] kfree+0xca/0x250 [ 32.386514] kvfree+0x36/0x60 [ 32.389589] free_netdev+0x2cf/0x360 [ 32.393273] __tun_chr_ioctl+0x2cf6/0x3d20 [ 32.397477] tun_chr_ioctl+0x2a/0x40 [ 32.401159] do_vfs_ioctl+0x1b1/0x1530 [ 32.405015] SyS_ioctl+0x8f/0xc0 [ 32.408353] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.413075] [ 32.414672] The buggy address belongs to the object at ffff8801ce0602c0 [ 32.414672] which belongs to the cache kmalloc-16384 of size 16384 [ 32.427645] The buggy address is located 13320 bytes inside of [ 32.427645] 16384-byte region [ffff8801ce0602c0, ffff8801ce0642c0) [ 32.439834] The buggy address belongs to the page: [ 32.444731] page:ffffea0007381800 count:1 mapcount:0 mapping:ffff8801ce0602c0 index:0x0 compound_mapcount: 0 [ 32.454673] flags: 0x200000000008100(slab|head) [ 32.459311] raw: 0200000000008100 ffff8801ce0602c0 0000000000000000 0000000100000001 [ 32.467165] raw: ffffea0007556a20 ffffea000739ce20 ffff8801dac02200 0000000000000000 [ 32.475011] page dumped because: kasan: bad access detected [ 32.480687] [ 32.482283] Memory state around the buggy address: [ 32.487183] ffff8801ce063580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.494510] ffff8801ce063600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.501838] >ffff8801ce063680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.509164] ^ [ 32.514842] ffff8801ce063700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.522169] ffff8801ce063780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.529505] ================================================================== [ 32.536830] Disabling lock debugging due to kernel taint [ 32.542243] Kernel panic - not syncing: panic_on_warn set ... [ 32.542243] [ 32.549568] CPU: 0 PID: 2985 Comm: syzkaller955032 Tainted: G B 4.14.0-rc3+ #119 [ 32.558190] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.567508] Call Trace: [ 32.570064] dump_stack+0x194/0x257 [ 32.573657] ? arch_local_irq_restore+0x53/0x53 [ 32.578292] ? vprintk_default+0x28/0x30 [ 32.582321] ? __internal_add_timer+0x1f0/0x2d0 [ 32.586959] panic+0x1e4/0x417 [ 32.590116] ? __warn+0x1d9/0x1d9 [ 32.593542] ? __internal_add_timer+0x275/0x2d0 [ 32.598175] kasan_end_report+0x50/0x50 [ 32.602126] kasan_report+0x144/0x340 [ 32.605896] __asan_report_store8_noabort+0x17/0x20 [ 32.610877] __internal_add_timer+0x275/0x2d0 [ 32.615341] ? calc_wheel_index+0x200/0x200 [ 32.619632] mod_timer+0x622/0x15b0 [ 32.623229] ? mod_timer_pending+0x14e0/0x14e0 [ 32.627775] ? __lock_is_held+0xbc/0x140 [ 32.631808] ? __lock_is_held+0xbc/0x140 [ 32.635837] ? __lockdep_init_map+0xe4/0x650 [ 32.640212] ? lockdep_init_map+0x3d/0x70 [ 32.644327] ? rcu_read_lock_sched_held+0x108/0x120 [ 32.649310] ? init_timer_key+0x126/0x3b0 [ 32.653424] ? try_to_del_timer_sync+0x120/0x120 [ 32.658145] ? round_jiffies_up+0xce/0x100 [ 32.662344] ? __round_jiffies_up_relative+0x150/0x150 [ 32.667584] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 32.672478] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 32.677984] __tun_chr_ioctl+0x1b23/0x3d20 [ 32.682189] ? tun_chr_read_iter+0x1e0/0x1e0 [ 32.686562] ? lock_downgrade+0x990/0x990 [ 32.690687] ? handle_mm_fault+0x410/0x8d0 [ 32.694886] ? __do_page_fault+0x31e/0xd60 [ 32.699091] ? check_same_owner+0x320/0x320 [ 32.703377] ? up_read+0x1a/0x40 [ 32.706707] ? __do_page_fault+0x3d6/0xd60 [ 32.710907] ? tun_chr_compat_ioctl+0x30/0x30 [ 32.715365] tun_chr_ioctl+0x2a/0x40 [ 32.719043] ? tun_chr_ioctl+0x2a/0x40 [ 32.722895] do_vfs_ioctl+0x1b1/0x1530 [ 32.726749] ? ioctl_preallocate+0x2b0/0x2b0 [ 32.731122] ? selinux_capable+0x40/0x40 [ 32.735149] ? putname+0xf3/0x130 [ 32.738570] ? do_sys_open+0x320/0x6d0 [ 32.742427] ? security_file_ioctl+0x89/0xb0 [ 32.746803] SyS_ioctl+0x8f/0xc0 [ 32.750140] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 32.754858] RIP: 0033:0x443d99 [ 32.758014] RSP: 002b:00007ffc3c921fa8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 32.765687] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 32.772922] RDX: 0000000020927fd8 RSI: 00000000400454ca RDI: 0000000000000006 [ 32.780157] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 32.787392] R10: 0000000000000000 R11: 0000000000000207 R12: 0000000000401a80 [ 32.794630] R13: 0000000000401b10 R14: 0000000000000000 R15: 0000000000000000