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-6,10.128.0.63' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 43.030559] ================================================================== [ 43.037995] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 43.044993] Write of size 8 at addr ffff8801cc5036c8 by task syzkaller143474/3040 [ 43.052597] [ 43.054214] CPU: 1 PID: 3040 Comm: syzkaller143474 Not tainted 4.13.0+ #71 [ 43.061193] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.070518] Call Trace: [ 43.073080] dump_stack+0x194/0x257 [ 43.076681] ? arch_local_irq_restore+0x53/0x53 [ 43.081323] ? show_regs_print_info+0x65/0x65 [ 43.085796] ? __kernel_text_address+0xae/0xe0 [ 43.090355] ? __internal_add_timer+0x275/0x2d0 [ 43.095012] print_address_description+0x73/0x250 [ 43.099827] ? __internal_add_timer+0x275/0x2d0 [ 43.104472] kasan_report+0x24e/0x340 [ 43.108249] __asan_report_store8_noabort+0x17/0x20 [ 43.113239] __internal_add_timer+0x275/0x2d0 [ 43.117713] ? calc_wheel_index+0x200/0x200 [ 43.122019] mod_timer+0x622/0x15b0 [ 43.125642] ? mod_timer_pending+0x14e0/0x14e0 [ 43.130196] ? __lock_is_held+0xbc/0x140 [ 43.134242] ? __lock_is_held+0xbc/0x140 [ 43.138281] ? __lockdep_init_map+0xe4/0x650 [ 43.142669] ? lockdep_init_map+0x3d/0x70 [ 43.146792] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.151782] ? init_timer_key+0x126/0x3b0 [ 43.155907] ? try_to_del_timer_sync+0x120/0x120 [ 43.160646] ? round_jiffies_up+0xce/0x100 [ 43.164850] ? __round_jiffies_up_relative+0x150/0x150 [ 43.170099] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 43.175002] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 43.180519] __tun_chr_ioctl+0x1b2c/0x3d70 [ 43.184725] ? unwind_get_return_address+0x64/0xa0 [ 43.189637] ? tun_select_queue+0x580/0x580 [ 43.193934] ? putname+0xee/0x130 [ 43.197359] ? save_stack+0xa3/0xd0 [ 43.200962] ? save_stack_trace+0x16/0x20 [ 43.205080] ? save_stack+0x43/0xd0 [ 43.208673] ? kasan_slab_free+0x71/0xc0 [ 43.212704] ? kmem_cache_free+0x77/0x280 [ 43.216831] ? putname+0xee/0x130 [ 43.220262] ? __lock_is_held+0xbc/0x140 [ 43.224312] ? check_same_owner+0x320/0x320 [ 43.228617] ? tun_chr_compat_ioctl+0x30/0x30 [ 43.233088] tun_chr_ioctl+0x2a/0x40 [ 43.236778] ? tun_chr_ioctl+0x2a/0x40 [ 43.240641] do_vfs_ioctl+0x1b1/0x1530 [ 43.244506] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.248889] ? selinux_capable+0x40/0x40 [ 43.252925] ? putname+0xf3/0x130 [ 43.256360] ? do_sys_open+0x320/0x6d0 [ 43.260228] ? security_file_ioctl+0x7d/0xb0 [ 43.264604] ? security_file_ioctl+0x89/0xb0 [ 43.268987] SyS_ioctl+0x8f/0xc0 [ 43.272334] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.277061] RIP: 0033:0x443d69 [ 43.280220] RSP: 002b:00007ffcecda3118 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 43.287899] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d69 [ 43.295152] RDX: 0000000020001fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 43.302406] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 43.309647] R10: 0000000000000000 R11: 0000000000000206 R12: 6ffc940ff206c64e [ 43.316887] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 43.324148] [ 43.325748] Allocated by task 3040: [ 43.329351] save_stack_trace+0x16/0x20 [ 43.333297] save_stack+0x43/0xd0 [ 43.336721] kasan_kmalloc+0xad/0xe0 [ 43.340403] __kmalloc_node+0x47/0x70 [ 43.344173] kvmalloc_node+0x64/0xd0 [ 43.347859] alloc_netdev_mqs+0x16e/0xed0 [ 43.351979] __tun_chr_ioctl+0x12be/0x3d70 [ 43.356184] tun_chr_ioctl+0x2a/0x40 [ 43.359867] do_vfs_ioctl+0x1b1/0x1530 [ 43.363742] SyS_ioctl+0x8f/0xc0 [ 43.367082] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.371811] [ 43.373409] Freed by task 3040: [ 43.376658] save_stack_trace+0x16/0x20 [ 43.380598] save_stack+0x43/0xd0 [ 43.384021] kasan_slab_free+0x71/0xc0 [ 43.387877] kfree+0xca/0x250 [ 43.390950] kvfree+0x36/0x60 [ 43.394028] free_netdev+0x2cf/0x360 [ 43.397711] __tun_chr_ioctl+0x2d30/0x3d70 [ 43.401915] tun_chr_ioctl+0x2a/0x40 [ 43.405597] do_vfs_ioctl+0x1b1/0x1530 [ 43.409454] SyS_ioctl+0x8f/0xc0 [ 43.412793] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.417514] [ 43.419111] The buggy address belongs to the object at ffff8801cc5002c0 [ 43.419111] which belongs to the cache kmalloc-16384 of size 16384 [ 43.432085] The buggy address is located 13320 bytes inside of [ 43.432085] 16384-byte region [ffff8801cc5002c0, ffff8801cc5042c0) [ 43.444274] The buggy address belongs to the page: [ 43.449174] page:ffffea0007314000 count:1 mapcount:0 mapping:ffff8801cc5002c0 index:0x0 compound_mapcount: 0 [ 43.459116] flags: 0x200000000008100(slab|head) [ 43.463754] raw: 0200000000008100 ffff8801cc5002c0 0000000000000000 0000000100000001 [ 43.471605] raw: ffffea0007508a20 ffffea0007313020 ffff8801dac02200 0000000000000000 [ 43.479450] page dumped because: kasan: bad access detected [ 43.485123] [ 43.486720] Memory state around the buggy address: [ 43.491616] ffff8801cc503580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.498955] ffff8801cc503600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.506287] >ffff8801cc503680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.513613] ^ [ 43.519290] ffff8801cc503700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.526617] ffff8801cc503780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.533944] ================================================================== [ 43.541270] Disabling lock debugging due to kernel taint [ 43.546682] Kernel panic - not syncing: panic_on_warn set ... [ 43.546682] [ 43.554007] CPU: 1 PID: 3040 Comm: syzkaller143474 Tainted: G B 4.13.0+ #71 [ 43.562197] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.571524] Call Trace: [ 43.574085] dump_stack+0x194/0x257 [ 43.577678] ? arch_local_irq_restore+0x53/0x53 [ 43.582311] ? vprintk_default+0x28/0x30 [ 43.586338] ? __internal_add_timer+0x1a0/0x2d0 [ 43.590971] panic+0x1e4/0x417 [ 43.594127] ? __warn+0x1d9/0x1d9 [ 43.597551] ? __internal_add_timer+0x275/0x2d0 [ 43.602185] kasan_end_report+0x50/0x50 [ 43.606123] kasan_report+0x137/0x340 [ 43.609890] __asan_report_store8_noabort+0x17/0x20 [ 43.614868] __internal_add_timer+0x275/0x2d0 [ 43.619333] ? calc_wheel_index+0x200/0x200 [ 43.623631] mod_timer+0x622/0x15b0 [ 43.627228] ? mod_timer_pending+0x14e0/0x14e0 [ 43.631781] ? __lock_is_held+0xbc/0x140 [ 43.635814] ? __lock_is_held+0xbc/0x140 [ 43.639839] ? __lockdep_init_map+0xe4/0x650 [ 43.644215] ? lockdep_init_map+0x3d/0x70 [ 43.648328] ? rcu_read_lock_sched_held+0x108/0x120 [ 43.653312] ? init_timer_key+0x126/0x3b0 [ 43.657424] ? try_to_del_timer_sync+0x120/0x120 [ 43.662144] ? round_jiffies_up+0xce/0x100 [ 43.666349] ? __round_jiffies_up_relative+0x150/0x150 [ 43.671588] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 43.676485] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 43.681992] __tun_chr_ioctl+0x1b2c/0x3d70 [ 43.686189] ? unwind_get_return_address+0x64/0xa0 [ 43.691085] ? tun_select_queue+0x580/0x580 [ 43.695371] ? putname+0xee/0x130 [ 43.698787] ? save_stack+0xa3/0xd0 [ 43.702378] ? save_stack_trace+0x16/0x20 [ 43.706486] ? save_stack+0x43/0xd0 [ 43.710077] ? kasan_slab_free+0x71/0xc0 [ 43.714109] ? kmem_cache_free+0x77/0x280 [ 43.718221] ? putname+0xee/0x130 [ 43.721640] ? __lock_is_held+0xbc/0x140 [ 43.725677] ? check_same_owner+0x320/0x320 [ 43.729967] ? tun_chr_compat_ioctl+0x30/0x30 [ 43.734425] tun_chr_ioctl+0x2a/0x40 [ 43.738103] ? tun_chr_ioctl+0x2a/0x40 [ 43.741954] do_vfs_ioctl+0x1b1/0x1530 [ 43.745806] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.750180] ? selinux_capable+0x40/0x40 [ 43.754209] ? putname+0xf3/0x130 [ 43.757629] ? do_sys_open+0x320/0x6d0 [ 43.761489] ? security_file_ioctl+0x7d/0xb0 [ 43.765860] ? security_file_ioctl+0x89/0xb0 [ 43.770233] SyS_ioctl+0x8f/0xc0 [ 43.773567] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.778294] RIP: 0033:0x443d69 [ 43.781448] RSP: 002b:00007ffcecda3118 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 43.789119] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d69 [ 43.796361] RDX: 0000000020001fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 43.803596] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 43.810831] R10: 0000000000000000 R11: 0000000000000206 R12: 6ffc940ff206c64e [ 43.818064] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 43.825347] Dumping ftrace buffer: [ 43.828852] (ftrace buffer empty) [ 43.832526] Kernel Offset: disabled [ 43.836119] Rebooting in 86400 seconds..