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-4,10.128.15.213' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 29.549875] ================================================================== [ 29.550951] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 29.551871] Write of size 8 at addr ffff8801d217b500 by task syzkaller333812/2989 [ 29.552867] [ 29.553100] CPU: 0 PID: 2989 Comm: syzkaller333812 Not tainted 4.14.0-rc5+ #139 [ 29.554112] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.555401] Call Trace: [ 29.555784] dump_stack+0x194/0x257 [ 29.556300] ? arch_local_irq_restore+0x53/0x53 [ 29.556959] ? show_regs_print_info+0x65/0x65 [ 29.557565] ? __kernel_text_address+0xd/0x40 [ 29.558175] ? __internal_add_timer+0x275/0x2d0 [ 29.558813] print_address_description+0x73/0x250 [ 29.559457] ? __internal_add_timer+0x275/0x2d0 [ 29.560079] kasan_report+0x25b/0x340 [ 29.560592] __asan_report_store8_noabort+0x17/0x20 [ 29.561256] __internal_add_timer+0x275/0x2d0 [ 29.561859] ? calc_wheel_index+0x200/0x200 [ 29.562448] mod_timer+0x622/0x15b0 [ 29.562944] ? mod_timer_pending+0x14e0/0x14e0 [ 29.563557] ? __lock_is_held+0xb6/0x140 [ 29.564114] ? __lock_is_held+0xb6/0x140 [ 29.564663] ? __lockdep_init_map+0xe4/0x650 [ 29.565254] ? lockdep_init_map+0x9/0x10 [ 29.565796] ? init_timer_key+0x126/0x3b0 [ 29.566353] ? try_to_del_timer_sync+0x120/0x120 [ 29.566986] ? round_jiffies_up+0xce/0x100 [ 29.567553] ? __round_jiffies_up_relative+0x150/0x150 [ 29.568251] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 29.568950] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 29.569719] __tun_chr_ioctl+0x1b17/0x3d20 [ 29.570319] ? tun_chr_read_iter+0x1e0/0x1e0 [ 29.574692] ? find_held_lock+0x35/0x1d0 [ 29.578730] ? __do_page_fault+0x64c/0xd60 [ 29.582931] ? lock_downgrade+0x990/0x990 [ 29.587052] ? handle_mm_fault+0x410/0x8d0 [ 29.591265] ? check_same_owner+0x320/0x320 [ 29.595549] ? up_read+0x1a/0x40 [ 29.598881] ? __do_page_fault+0x3d6/0xd60 [ 29.603084] ? tun_chr_compat_ioctl+0x30/0x30 [ 29.607543] tun_chr_ioctl+0x2a/0x40 [ 29.611221] ? tun_chr_ioctl+0x2a/0x40 [ 29.615078] do_vfs_ioctl+0x1b1/0x1520 [ 29.618936] ? ioctl_preallocate+0x2b0/0x2b0 [ 29.623316] ? selinux_capable+0x40/0x40 [ 29.627344] ? putname+0xf3/0x130 [ 29.630766] ? do_sys_open+0x320/0x6d0 [ 29.634629] ? security_file_ioctl+0x89/0xb0 [ 29.639008] SyS_ioctl+0x8f/0xc0 [ 29.642344] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 29.647063] RIP: 0033:0x443d99 [ 29.650218] RSP: 002b:00007ffddf3ea888 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 29.658065] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 29.665301] RDX: 00000000209f2fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 29.672535] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 29.679769] R10: 0000000000000000 R11: 0000000000000202 R12: 9dd077723c306246 [ 29.687011] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 29.694262] [ 29.695855] Allocated by task 2989: [ 29.699457] save_stack_trace+0x16/0x20 [ 29.703397] save_stack+0x43/0xd0 [ 29.706812] kasan_kmalloc+0xad/0xe0 [ 29.710491] __kmalloc_node+0x47/0x70 [ 29.714254] kvmalloc_node+0x64/0xd0 [ 29.717932] alloc_netdev_mqs+0x16e/0xed0 [ 29.722044] __tun_chr_ioctl+0x12b2/0x3d20 [ 29.726240] tun_chr_ioctl+0x2a/0x40 [ 29.729917] do_vfs_ioctl+0x1b1/0x1520 [ 29.733770] SyS_ioctl+0x8f/0xc0 [ 29.738061] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 29.742777] [ 29.744369] Freed by task 2989: [ 29.747614] save_stack_trace+0x16/0x20 [ 29.751554] save_stack+0x43/0xd0 [ 29.755406] kasan_slab_free+0x71/0xc0 [ 29.759258] kfree+0xca/0x250 [ 29.762330] kvfree+0x36/0x60 [ 29.765401] free_netdev+0x2cf/0x360 [ 29.769077] __tun_chr_ioctl+0x2cea/0x3d20 [ 29.773274] tun_chr_ioctl+0x2a/0x40 [ 29.776952] do_vfs_ioctl+0x1b1/0x1520 [ 29.780802] SyS_ioctl+0x8f/0xc0 [ 29.784133] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 29.788850] [ 29.790443] The buggy address belongs to the object at ffff8801d21781c0 [ 29.790443] which belongs to the cache kmalloc-16384 of size 16384 [ 29.803411] The buggy address is located 13120 bytes inside of [ 29.803411] 16384-byte region [ffff8801d21781c0, ffff8801d217c1c0) [ 29.815593] The buggy address belongs to the page: [ 29.820487] page:ffffea0007485e00 count:1 mapcount:0 mapping:ffff8801d21781c0 index:0x0 compound_mapcount: 0 [ 29.830423] flags: 0x200000000008100(slab|head) [ 29.835058] raw: 0200000000008100 ffff8801d21781c0 0000000000000000 0000000100000001 [ 29.842902] raw: ffffea0007641820 ffffea0007659a20 ffff8801dac02200 0000000000000000 [ 29.850748] page dumped because: kasan: bad access detected [ 29.856420] [ 29.858012] Memory state around the buggy address: [ 29.862904] ffff8801d217b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.870228] ffff8801d217b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.877553] >ffff8801d217b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.884875] ^ [ 29.888203] ffff8801d217b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.895528] ffff8801d217b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 29.902848] ================================================================== [ 29.910168] Disabling lock debugging due to kernel taint [ 29.915667] Kernel panic - not syncing: panic_on_warn set ... [ 29.915667] [ 29.922992] CPU: 0 PID: 2989 Comm: syzkaller333812 Tainted: G B 4.14.0-rc5+ #139 [ 29.931614] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.940932] Call Trace: [ 29.943494] dump_stack+0x194/0x257 [ 29.947086] ? arch_local_irq_restore+0x53/0x53 [ 29.951720] ? kasan_end_report+0x32/0x50 [ 29.955836] ? lock_downgrade+0x990/0x990 [ 29.959949] ? __internal_add_timer+0x1c0/0x2d0 [ 29.964582] panic+0x1e4/0x417 [ 29.967742] ? __warn+0x1d9/0x1d9 [ 29.971167] ? __internal_add_timer+0x275/0x2d0 [ 29.975800] kasan_end_report+0x50/0x50 [ 29.979738] kasan_report+0x144/0x340 [ 29.983504] __asan_report_store8_noabort+0x17/0x20 [ 29.988482] __internal_add_timer+0x275/0x2d0 [ 29.992939] ? calc_wheel_index+0x200/0x200 [ 29.997232] mod_timer+0x622/0x15b0 [ 30.000830] ? mod_timer_pending+0x14e0/0x14e0 [ 30.005377] ? __lock_is_held+0xb6/0x140 [ 30.009408] ? __lock_is_held+0xb6/0x140 [ 30.013433] ? __lockdep_init_map+0xe4/0x650 [ 30.017807] ? lockdep_init_map+0x9/0x10 [ 30.021831] ? init_timer_key+0x126/0x3b0 [ 30.025947] ? try_to_del_timer_sync+0x120/0x120 [ 30.030668] ? round_jiffies_up+0xce/0x100 [ 30.034865] ? __round_jiffies_up_relative+0x150/0x150 [ 30.040103] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 30.044996] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 30.050498] __tun_chr_ioctl+0x1b17/0x3d20 [ 30.054703] ? tun_chr_read_iter+0x1e0/0x1e0 [ 30.059074] ? find_held_lock+0x35/0x1d0 [ 30.063104] ? __do_page_fault+0x64c/0xd60 [ 30.067302] ? lock_downgrade+0x990/0x990 [ 30.071417] ? handle_mm_fault+0x410/0x8d0 [ 30.075623] ? check_same_owner+0x320/0x320 [ 30.079914] ? up_read+0x1a/0x40 [ 30.083246] ? __do_page_fault+0x3d6/0xd60 [ 30.087446] ? tun_chr_compat_ioctl+0x30/0x30 [ 30.091905] tun_chr_ioctl+0x2a/0x40 [ 30.095580] ? tun_chr_ioctl+0x2a/0x40 [ 30.099432] do_vfs_ioctl+0x1b1/0x1520 [ 30.103287] ? ioctl_preallocate+0x2b0/0x2b0 [ 30.107661] ? selinux_capable+0x40/0x40 [ 30.111684] ? putname+0xf3/0x130 [ 30.115106] ? do_sys_open+0x320/0x6d0 [ 30.118961] ? security_file_ioctl+0x89/0xb0 [ 30.123333] SyS_ioctl+0x8f/0xc0 [ 30.126668] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 30.131386] RIP: 0033:0x443d99 [ 30.134541] RSP: 002b:00007ffddf3ea888 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 30.142213] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d99 [ 30.149446] RDX: 00000000209f2fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 30.156687] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 30.163927] R10: 0000000000000000 R11: 0000000000000202 R12: 9dd077723c306246 [ 30.171162] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000