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.0.36' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 43.105390] ================================================================== [ 43.106548] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 43.107471] Write of size 8 at addr ffff8801c1f8b600 by task syzkaller084731/2991 [ 43.108501] [ 43.108733] CPU: 0 PID: 2991 Comm: syzkaller084731 Not tainted 4.14.0-rc5+ #142 [ 43.109739] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.110960] Call Trace: [ 43.111318] dump_stack+0x194/0x257 [ 43.111810] ? arch_local_irq_restore+0x53/0x53 [ 43.112449] ? show_regs_print_info+0x65/0x65 [ 43.113056] ? __kernel_text_address+0xd/0x40 [ 43.113656] ? __internal_add_timer+0x275/0x2d0 [ 43.114279] print_address_description+0x73/0x250 [ 43.114969] ? __internal_add_timer+0x275/0x2d0 [ 43.115592] kasan_report+0x25b/0x340 [ 43.116109] __asan_report_store8_noabort+0x17/0x20 [ 43.116777] __internal_add_timer+0x275/0x2d0 [ 43.117377] ? calc_wheel_index+0x200/0x200 [ 43.118003] mod_timer+0x622/0x15b0 [ 43.118529] ? mod_timer_pending+0x14e0/0x14e0 [ 43.119143] ? __lock_is_held+0xb6/0x140 [ 43.119700] ? __lock_is_held+0xb6/0x140 [ 43.120268] ? __lockdep_init_map+0xe4/0x650 [ 43.120875] ? lockdep_init_map+0x9/0x10 [ 43.121417] ? init_timer_key+0x126/0x3b0 [ 43.121974] ? try_to_del_timer_sync+0x120/0x120 [ 43.122609] ? round_jiffies_up+0xce/0x100 [ 43.123175] ? __round_jiffies_up_relative+0x150/0x150 [ 43.123874] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 43.124532] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 43.125274] __tun_chr_ioctl+0x1b17/0x3d20 [ 43.127837] ? tun_chr_read_iter+0x1e0/0x1e0 [ 43.132212] ? find_held_lock+0x35/0x1d0 [ 43.136255] ? __do_page_fault+0x64c/0xd60 [ 43.140463] ? lock_downgrade+0x990/0x990 [ 43.144594] ? handle_mm_fault+0x410/0x8d0 [ 43.148814] ? check_same_owner+0x320/0x320 [ 43.153104] ? up_read+0x1a/0x40 [ 43.156438] ? __do_page_fault+0x3d6/0xd60 [ 43.160647] ? tun_chr_compat_ioctl+0x30/0x30 [ 43.165109] tun_chr_ioctl+0x2a/0x40 [ 43.168791] ? tun_chr_ioctl+0x2a/0x40 [ 43.172652] do_vfs_ioctl+0x1b1/0x1520 [ 43.176513] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.180892] ? selinux_capable+0x40/0x40 [ 43.184922] ? putname+0xf3/0x130 [ 43.188348] ? do_sys_open+0x320/0x6d0 [ 43.192215] ? security_file_ioctl+0x89/0xb0 [ 43.196592] SyS_ioctl+0x8f/0xc0 [ 43.199930] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.204651] RIP: 0033:0x443d79 [ 43.207807] RSP: 002b:00007fff983b7ad8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 43.215481] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d79 [ 43.222716] RDX: 0000000020a5afd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 43.229951] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 43.237186] R10: 0000000000000000 R11: 0000000000000206 R12: 2fea1ff7dcce140f [ 43.244419] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 43.251669] [ 43.253261] Allocated by task 2991: [ 43.256857] save_stack_trace+0x16/0x20 [ 43.260798] save_stack+0x43/0xd0 [ 43.264214] kasan_kmalloc+0xad/0xe0 [ 43.267893] __kmalloc_node+0x47/0x70 [ 43.271660] kvmalloc_node+0x64/0xd0 [ 43.275343] alloc_netdev_mqs+0x16e/0xed0 [ 43.279456] __tun_chr_ioctl+0x12b2/0x3d20 [ 43.283653] tun_chr_ioctl+0x2a/0x40 [ 43.287329] do_vfs_ioctl+0x1b1/0x1520 [ 43.291179] SyS_ioctl+0x8f/0xc0 [ 43.294510] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.299228] [ 43.300819] Freed by task 2991: [ 43.304065] save_stack_trace+0x16/0x20 [ 43.308003] save_stack+0x43/0xd0 [ 43.311423] kasan_slab_free+0x71/0xc0 [ 43.315274] kfree+0xca/0x250 [ 43.318343] kvfree+0x36/0x60 [ 43.321410] free_netdev+0x2cf/0x360 [ 43.325088] __tun_chr_ioctl+0x2cea/0x3d20 [ 43.329286] tun_chr_ioctl+0x2a/0x40 [ 43.332963] do_vfs_ioctl+0x1b1/0x1520 [ 43.336813] SyS_ioctl+0x8f/0xc0 [ 43.340144] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.344863] [ 43.346462] The buggy address belongs to the object at ffff8801c1f882c0 [ 43.346462] which belongs to the cache kmalloc-16384 of size 16384 [ 43.359430] The buggy address is located 13120 bytes inside of [ 43.359430] 16384-byte region [ffff8801c1f882c0, ffff8801c1f8c2c0) [ 43.371612] The buggy address belongs to the page: [ 43.376507] page:ffffea000707e200 count:1 mapcount:0 mapping:ffff8801c1f882c0 index:0x0 compound_mapcount: 0 [ 43.386441] flags: 0x200000000008100(slab|head) [ 43.391080] raw: 0200000000008100 ffff8801c1f882c0 0000000000000000 0000000100000001 [ 43.398925] raw: ffffea0007643420 ffffea0007479e20 ffff8801dac02200 0000000000000000 [ 43.406770] page dumped because: kasan: bad access detected [ 43.412443] [ 43.414036] Memory state around the buggy address: [ 43.418929] ffff8801c1f8b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.426253] ffff8801c1f8b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.433576] >ffff8801c1f8b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.440900] ^ [ 43.444232] ffff8801c1f8b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.451554] ffff8801c1f8b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 43.458876] ================================================================== [ 43.466206] Disabling lock debugging due to kernel taint [ 43.471619] Kernel panic - not syncing: panic_on_warn set ... [ 43.471619] [ 43.478948] CPU: 0 PID: 2991 Comm: syzkaller084731 Tainted: G B 4.14.0-rc5+ #142 [ 43.487573] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.496890] Call Trace: [ 43.499446] dump_stack+0x194/0x257 [ 43.503042] ? arch_local_irq_restore+0x53/0x53 [ 43.507675] ? kasan_end_report+0x32/0x50 [ 43.511791] ? lock_downgrade+0x990/0x990 [ 43.515909] ? __internal_add_timer+0x1f0/0x2d0 [ 43.520544] panic+0x1e4/0x417 [ 43.523702] ? __warn+0x1d9/0x1d9 [ 43.527125] ? __internal_add_timer+0x275/0x2d0 [ 43.531759] kasan_end_report+0x50/0x50 [ 43.535695] kasan_report+0x144/0x340 [ 43.539463] __asan_report_store8_noabort+0x17/0x20 [ 43.544442] __internal_add_timer+0x275/0x2d0 [ 43.548902] ? calc_wheel_index+0x200/0x200 [ 43.553192] mod_timer+0x622/0x15b0 [ 43.556788] ? mod_timer_pending+0x14e0/0x14e0 [ 43.561333] ? __lock_is_held+0xb6/0x140 [ 43.565365] ? __lock_is_held+0xb6/0x140 [ 43.569390] ? __lockdep_init_map+0xe4/0x650 [ 43.573764] ? lockdep_init_map+0x9/0x10 [ 43.577788] ? init_timer_key+0x126/0x3b0 [ 43.581900] ? try_to_del_timer_sync+0x120/0x120 [ 43.586619] ? round_jiffies_up+0xce/0x100 [ 43.590815] ? __round_jiffies_up_relative+0x150/0x150 [ 43.596059] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 43.600956] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 43.606463] __tun_chr_ioctl+0x1b17/0x3d20 [ 43.610667] ? tun_chr_read_iter+0x1e0/0x1e0 [ 43.615040] ? find_held_lock+0x35/0x1d0 [ 43.619070] ? __do_page_fault+0x64c/0xd60 [ 43.623270] ? lock_downgrade+0x990/0x990 [ 43.627386] ? handle_mm_fault+0x410/0x8d0 [ 43.631592] ? check_same_owner+0x320/0x320 [ 43.635874] ? up_read+0x1a/0x40 [ 43.639206] ? __do_page_fault+0x3d6/0xd60 [ 43.643405] ? tun_chr_compat_ioctl+0x30/0x30 [ 43.647864] tun_chr_ioctl+0x2a/0x40 [ 43.651540] ? tun_chr_ioctl+0x2a/0x40 [ 43.655392] do_vfs_ioctl+0x1b1/0x1520 [ 43.659245] ? ioctl_preallocate+0x2b0/0x2b0 [ 43.663618] ? selinux_capable+0x40/0x40 [ 43.667644] ? putname+0xf3/0x130 [ 43.671063] ? do_sys_open+0x320/0x6d0 [ 43.674923] ? security_file_ioctl+0x89/0xb0 [ 43.679296] SyS_ioctl+0x8f/0xc0 [ 43.682633] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 43.687355] RIP: 0033:0x443d79 [ 43.690511] RSP: 002b:00007fff983b7ad8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 43.698182] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d79 [ 43.705417] RDX: 0000000020a5afd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 43.712661] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 43.719896] R10: 0000000000000000 R11: 0000000000000206 R12: 2fea1ff7dcce140f [ 43.727131] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 43.734411] Dumping ftrace buffer: [ 43.737916] (ftrace buffer empty) [ 43.741595] Kernel Offset: disabled [ 43.745190] Rebooting in 86400 seconds..