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-9,10.128.15.199' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 51.000254] ================================================================== [ 51.007695] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 51.014683] Write of size 8 at addr ffff8801cc4d36c8 by task syzkaller344248/3038 [ 51.022273] [ 51.023873] CPU: 1 PID: 3038 Comm: syzkaller344248 Not tainted 4.13.0+ #71 [ 51.030855] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.040193] Call Trace: [ 51.042759] dump_stack+0x194/0x257 [ 51.046362] ? arch_local_irq_restore+0x53/0x53 [ 51.051003] ? show_regs_print_info+0x65/0x65 [ 51.055475] ? __kernel_text_address+0xae/0xe0 [ 51.060030] ? __internal_add_timer+0x275/0x2d0 [ 51.064677] print_address_description+0x73/0x250 [ 51.069495] ? __internal_add_timer+0x275/0x2d0 [ 51.074136] kasan_report+0x24e/0x340 [ 51.077912] __asan_report_store8_noabort+0x17/0x20 [ 51.082897] __internal_add_timer+0x275/0x2d0 [ 51.087366] ? calc_wheel_index+0x200/0x200 [ 51.091669] mod_timer+0x622/0x15b0 [ 51.095277] ? mod_timer_pending+0x14e0/0x14e0 [ 51.099831] ? __lock_is_held+0xbc/0x140 [ 51.103889] ? __lock_is_held+0xbc/0x140 [ 51.107933] ? __lockdep_init_map+0xe4/0x650 [ 51.112326] ? lockdep_init_map+0x3d/0x70 [ 51.116455] ? rcu_read_lock_sched_held+0x108/0x120 [ 51.121445] ? init_timer_key+0x126/0x3b0 [ 51.125569] ? try_to_del_timer_sync+0x120/0x120 [ 51.130310] ? round_jiffies_up+0xce/0x100 [ 51.134516] ? __round_jiffies_up_relative+0x150/0x150 [ 51.139764] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 51.144681] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 51.150215] __tun_chr_ioctl+0x1b2c/0x3d70 [ 51.154436] ? unwind_get_return_address+0x64/0xa0 [ 51.159348] ? tun_select_queue+0x580/0x580 [ 51.163645] ? putname+0xee/0x130 [ 51.167082] ? save_stack+0xa3/0xd0 [ 51.170684] ? save_stack_trace+0x16/0x20 [ 51.174802] ? save_stack+0x43/0xd0 [ 51.178399] ? kasan_slab_free+0x71/0xc0 [ 51.182429] ? kmem_cache_free+0x77/0x280 [ 51.186546] ? putname+0xee/0x130 [ 51.189979] ? __lock_is_held+0xbc/0x140 [ 51.194030] ? check_same_owner+0x320/0x320 [ 51.198339] ? tun_chr_compat_ioctl+0x30/0x30 [ 51.202804] tun_chr_ioctl+0x2a/0x40 [ 51.206487] ? tun_chr_ioctl+0x2a/0x40 [ 51.210348] do_vfs_ioctl+0x1b1/0x1530 [ 51.214226] ? ioctl_preallocate+0x2b0/0x2b0 [ 51.218610] ? selinux_capable+0x40/0x40 [ 51.223431] ? putname+0xf3/0x130 [ 51.226859] ? do_sys_open+0x320/0x6d0 [ 51.230728] ? security_file_ioctl+0x7d/0xb0 [ 51.235106] ? security_file_ioctl+0x89/0xb0 [ 51.239496] SyS_ioctl+0x8f/0xc0 [ 51.242841] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.247567] RIP: 0033:0x443db9 [ 51.250730] RSP: 002b:00007ffc088854f8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 51.258409] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 51.265666] RDX: 000000002044e000 RSI: 00000000400454ca RDI: 0000000000000004 [ 51.272906] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 51.280162] R10: 0000000000000000 R11: 0000000000000202 R12: 63c68e2609f8a5a4 [ 51.287488] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 51.294744] [ 51.296345] Allocated by task 3038: [ 51.299944] save_stack_trace+0x16/0x20 [ 51.303889] save_stack+0x43/0xd0 [ 51.307312] kasan_kmalloc+0xad/0xe0 [ 51.310996] __kmalloc_node+0x47/0x70 [ 51.314764] kvmalloc_node+0x64/0xd0 [ 51.318454] alloc_netdev_mqs+0x16e/0xed0 [ 51.322574] __tun_chr_ioctl+0x12be/0x3d70 [ 51.326778] tun_chr_ioctl+0x2a/0x40 [ 51.330473] do_vfs_ioctl+0x1b1/0x1530 [ 51.334346] SyS_ioctl+0x8f/0xc0 [ 51.337682] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.342407] [ 51.344004] Freed by task 3038: [ 51.347253] save_stack_trace+0x16/0x20 [ 51.351198] save_stack+0x43/0xd0 [ 51.354621] kasan_slab_free+0x71/0xc0 [ 51.358478] kfree+0xca/0x250 [ 51.361563] kvfree+0x36/0x60 [ 51.364638] free_netdev+0x2cf/0x360 [ 51.368321] __tun_chr_ioctl+0x2d30/0x3d70 [ 51.372524] tun_chr_ioctl+0x2a/0x40 [ 51.376208] do_vfs_ioctl+0x1b1/0x1530 [ 51.380063] SyS_ioctl+0x8f/0xc0 [ 51.383402] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.388123] [ 51.389722] The buggy address belongs to the object at ffff8801cc4d02c0 [ 51.389722] which belongs to the cache kmalloc-16384 of size 16384 [ 51.402695] The buggy address is located 13320 bytes inside of [ 51.402695] 16384-byte region [ffff8801cc4d02c0, ffff8801cc4d42c0) [ 51.414884] The buggy address belongs to the page: [ 51.419783] page:ffffea0007313400 count:1 mapcount:0 mapping:ffff8801cc4d02c0 index:0x0 compound_mapcount: 0 [ 51.429839] flags: 0x200000000008100(slab|head) [ 51.434478] raw: 0200000000008100 ffff8801cc4d02c0 0000000000000000 0000000100000001 [ 51.442330] raw: ffffea0007506620 ffffea0007328420 ffff8801dac02200 0000000000000000 [ 51.450206] page dumped because: kasan: bad access detected [ 51.455882] [ 51.457481] Memory state around the buggy address: [ 51.462379] ffff8801cc4d3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.469709] ffff8801cc4d3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.477038] >ffff8801cc4d3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.484365] ^ [ 51.490045] ffff8801cc4d3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.497372] ffff8801cc4d3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 51.504697] ================================================================== [ 51.512022] Disabling lock debugging due to kernel taint [ 51.517438] Kernel panic - not syncing: panic_on_warn set ... [ 51.517438] [ 51.524763] CPU: 1 PID: 3038 Comm: syzkaller344248 Tainted: G B 4.13.0+ #71 [ 51.532953] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.542271] Call Trace: [ 51.544838] dump_stack+0x194/0x257 [ 51.548431] ? arch_local_irq_restore+0x53/0x53 [ 51.553065] ? vprintk_default+0x28/0x30 [ 51.557095] ? __internal_add_timer+0x1a0/0x2d0 [ 51.561730] panic+0x1e4/0x417 [ 51.564896] ? __warn+0x1d9/0x1d9 [ 51.568321] ? __internal_add_timer+0x275/0x2d0 [ 51.572955] kasan_end_report+0x50/0x50 [ 51.576898] kasan_report+0x137/0x340 [ 51.580665] __asan_report_store8_noabort+0x17/0x20 [ 51.585655] __internal_add_timer+0x275/0x2d0 [ 51.590117] ? calc_wheel_index+0x200/0x200 [ 51.594409] mod_timer+0x622/0x15b0 [ 51.598007] ? mod_timer_pending+0x14e0/0x14e0 [ 51.602561] ? __lock_is_held+0xbc/0x140 [ 51.606593] ? __lock_is_held+0xbc/0x140 [ 51.610620] ? __lockdep_init_map+0xe4/0x650 [ 51.614996] ? lockdep_init_map+0x3d/0x70 [ 51.619109] ? rcu_read_lock_sched_held+0x108/0x120 [ 51.624089] ? init_timer_key+0x126/0x3b0 [ 51.628205] ? try_to_del_timer_sync+0x120/0x120 [ 51.632926] ? round_jiffies_up+0xce/0x100 [ 51.637125] ? __round_jiffies_up_relative+0x150/0x150 [ 51.642372] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 51.647276] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 51.652782] __tun_chr_ioctl+0x1b2c/0x3d70 [ 51.656992] ? unwind_get_return_address+0x64/0xa0 [ 51.661890] ? tun_select_queue+0x580/0x580 [ 51.666183] ? putname+0xee/0x130 [ 51.669600] ? save_stack+0xa3/0xd0 [ 51.673194] ? save_stack_trace+0x16/0x20 [ 51.677304] ? save_stack+0x43/0xd0 [ 51.680893] ? kasan_slab_free+0x71/0xc0 [ 51.684916] ? kmem_cache_free+0x77/0x280 [ 51.689028] ? putname+0xee/0x130 [ 51.692453] ? __lock_is_held+0xbc/0x140 [ 51.696488] ? check_same_owner+0x320/0x320 [ 51.700777] ? tun_chr_compat_ioctl+0x30/0x30 [ 51.705237] tun_chr_ioctl+0x2a/0x40 [ 51.708913] ? tun_chr_ioctl+0x2a/0x40 [ 51.712764] do_vfs_ioctl+0x1b1/0x1530 [ 51.716626] ? ioctl_preallocate+0x2b0/0x2b0 [ 51.721001] ? selinux_capable+0x40/0x40 [ 51.725035] ? putname+0xf3/0x130 [ 51.728454] ? do_sys_open+0x320/0x6d0 [ 51.732324] ? security_file_ioctl+0x7d/0xb0 [ 51.736695] ? security_file_ioctl+0x89/0xb0 [ 51.741068] SyS_ioctl+0x8f/0xc0 [ 51.744415] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.749136] RIP: 0033:0x443db9 [ 51.752292] RSP: 002b:00007ffc088854f8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 51.759963] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 51.767207] RDX: 000000002044e000 RSI: 00000000400454ca RDI: 0000000000000004 [ 51.774441] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 51.781676] R10: 0000000000000000 R11: 0000000000000202 R12: 63c68e2609f8a5a4 [ 51.788910] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 51.796288] Dumping ftrace buffer: [ 51.799797] (ftrace buffer empty) [ 51.803473] Kernel Offset: disabled [ 51.807066] Rebooting in 86400 seconds..