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.233' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 33.796403] ================================================================== [ 33.797602] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 33.798564] Write of size 8 at addr ffff8801d21b3500 by task syzkaller105348/2991 [ 33.799559] [ 33.799793] CPU: 1 PID: 2991 Comm: syzkaller105348 Not tainted 4.14.0-rc5+ #138 [ 33.800784] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.802021] Call Trace: [ 33.802382] dump_stack+0x194/0x257 [ 33.802885] ? arch_local_irq_restore+0x53/0x53 [ 33.803507] ? show_regs_print_info+0x65/0x65 [ 33.804113] ? __kernel_text_address+0xd/0x40 [ 33.804712] ? __internal_add_timer+0x275/0x2d0 [ 33.805345] print_address_description+0x73/0x250 [ 33.805990] ? __internal_add_timer+0x275/0x2d0 [ 33.806613] kasan_report+0x25b/0x340 [ 33.807129] __asan_report_store8_noabort+0x17/0x20 [ 33.807808] __internal_add_timer+0x275/0x2d0 [ 33.808414] ? calc_wheel_index+0x200/0x200 [ 33.809003] mod_timer+0x622/0x15b0 [ 33.809502] ? mod_timer_pending+0x14e0/0x14e0 [ 33.810113] ? __lock_is_held+0xb6/0x140 [ 33.810717] ? __lock_is_held+0xb6/0x140 [ 33.811267] ? __lockdep_init_map+0xe4/0x650 [ 33.811963] ? lockdep_init_map+0x9/0x10 [ 33.812671] ? init_timer_key+0x126/0x3b0 [ 33.813258] ? try_to_del_timer_sync+0x120/0x120 [ 33.813922] ? round_jiffies_up+0xce/0x100 [ 33.814491] ? __round_jiffies_up_relative+0x150/0x150 [ 33.815213] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 33.815998] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 33.816739] __tun_chr_ioctl+0x1b17/0x3d20 [ 33.820951] ? tun_chr_read_iter+0x1e0/0x1e0 [ 33.825325] ? find_held_lock+0x35/0x1d0 [ 33.829371] ? __do_page_fault+0x64c/0xd60 [ 33.833575] ? lock_downgrade+0x990/0x990 [ 33.837699] ? handle_mm_fault+0x410/0x8d0 [ 33.841916] ? check_same_owner+0x320/0x320 [ 33.846205] ? up_read+0x1a/0x40 [ 33.849543] ? __do_page_fault+0x3d6/0xd60 [ 33.853747] ? tun_chr_compat_ioctl+0x30/0x30 [ 33.858209] tun_chr_ioctl+0x2a/0x40 [ 33.861890] ? tun_chr_ioctl+0x2a/0x40 [ 33.865751] do_vfs_ioctl+0x1b1/0x1520 [ 33.869612] ? ioctl_preallocate+0x2b0/0x2b0 [ 33.873990] ? selinux_capable+0x40/0x40 [ 33.878022] ? putname+0xf3/0x130 [ 33.881448] ? do_sys_open+0x320/0x6d0 [ 33.885312] ? security_file_ioctl+0x89/0xb0 [ 33.889691] SyS_ioctl+0x8f/0xc0 [ 33.893030] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.897753] RIP: 0033:0x443dc9 [ 33.900910] RSP: 002b:00007ffd18cf0658 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 33.908585] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443dc9 [ 33.915822] RDX: 0000000020927fd8 RSI: 00000000400454ca RDI: 0000000000000006 [ 33.923059] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 33.930296] R10: 0000000000000000 R11: 0000000000000207 R12: 33e9c828679bfde5 [ 33.937532] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 33.944788] [ 33.946383] Allocated by task 2991: [ 33.949986] save_stack_trace+0x16/0x20 [ 33.953926] save_stack+0x43/0xd0 [ 33.957346] kasan_kmalloc+0xad/0xe0 [ 33.961028] __kmalloc_node+0x47/0x70 [ 33.964803] kvmalloc_node+0x64/0xd0 [ 33.968484] alloc_netdev_mqs+0x16e/0xed0 [ 33.972597] __tun_chr_ioctl+0x12b2/0x3d20 [ 33.976796] tun_chr_ioctl+0x2a/0x40 [ 33.980474] do_vfs_ioctl+0x1b1/0x1520 [ 33.984328] SyS_ioctl+0x8f/0xc0 [ 33.987661] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 33.992381] [ 33.993979] Freed by task 2991: [ 33.997223] save_stack_trace+0x16/0x20 [ 34.001165] save_stack+0x43/0xd0 [ 34.004584] kasan_slab_free+0x71/0xc0 [ 34.008437] kfree+0xca/0x250 [ 34.011508] kvfree+0x36/0x60 [ 34.014578] free_netdev+0x2cf/0x360 [ 34.018258] __tun_chr_ioctl+0x2cea/0x3d20 [ 34.022456] tun_chr_ioctl+0x2a/0x40 [ 34.026136] do_vfs_ioctl+0x1b1/0x1520 [ 34.029989] SyS_ioctl+0x8f/0xc0 [ 34.033323] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.038041] [ 34.039636] The buggy address belongs to the object at ffff8801d21b01c0 [ 34.039636] which belongs to the cache kmalloc-16384 of size 16384 [ 34.052608] The buggy address is located 13120 bytes inside of [ 34.052608] 16384-byte region [ffff8801d21b01c0, ffff8801d21b41c0) [ 34.064794] The buggy address belongs to the page: [ 34.069690] page:ffffea0007486c00 count:1 mapcount:0 mapping:ffff8801d21b01c0 index:0x0 compound_mapcount: 0 [ 34.079624] flags: 0x200000000008100(slab|head) [ 34.084261] raw: 0200000000008100 ffff8801d21b01c0 0000000000000000 0000000100000001 [ 34.092110] raw: ffffea000765f420 ffffea0007461420 ffff8801dac02200 0000000000000000 [ 34.099956] page dumped because: kasan: bad access detected [ 34.105632] [ 34.107227] Memory state around the buggy address: [ 34.112123] ffff8801d21b3400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.119448] ffff8801d21b3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.126773] >ffff8801d21b3500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.134097] ^ [ 34.137429] ffff8801d21b3580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.144754] ffff8801d21b3600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.152076] ================================================================== [ 34.159399] Disabling lock debugging due to kernel taint [ 34.164814] Kernel panic - not syncing: panic_on_warn set ... [ 34.164814] [ 34.172141] CPU: 1 PID: 2991 Comm: syzkaller105348 Tainted: G B 4.14.0-rc5+ #138 [ 34.180766] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 34.190085] Call Trace: [ 34.192639] dump_stack+0x194/0x257 [ 34.196234] ? arch_local_irq_restore+0x53/0x53 [ 34.200868] ? kasan_end_report+0x32/0x50 [ 34.204985] ? lock_downgrade+0x990/0x990 [ 34.209100] ? __internal_add_timer+0x1c0/0x2d0 [ 34.213738] panic+0x1e4/0x417 [ 34.216895] ? __warn+0x1d9/0x1d9 [ 34.220321] ? __internal_add_timer+0x275/0x2d0 [ 34.224955] kasan_end_report+0x50/0x50 [ 34.228892] kasan_report+0x144/0x340 [ 34.232660] __asan_report_store8_noabort+0x17/0x20 [ 34.237639] __internal_add_timer+0x275/0x2d0 [ 34.242099] ? calc_wheel_index+0x200/0x200 [ 34.246395] mod_timer+0x622/0x15b0 [ 34.249991] ? mod_timer_pending+0x14e0/0x14e0 [ 34.254539] ? __lock_is_held+0xb6/0x140 [ 34.258572] ? __lock_is_held+0xb6/0x140 [ 34.262602] ? __lockdep_init_map+0xe4/0x650 [ 34.266979] ? lockdep_init_map+0x9/0x10 [ 34.271004] ? init_timer_key+0x126/0x3b0 [ 34.275120] ? try_to_del_timer_sync+0x120/0x120 [ 34.279841] ? round_jiffies_up+0xce/0x100 [ 34.284040] ? __round_jiffies_up_relative+0x150/0x150 [ 34.289285] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 34.294183] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 34.299689] __tun_chr_ioctl+0x1b17/0x3d20 [ 34.303895] ? tun_chr_read_iter+0x1e0/0x1e0 [ 34.308269] ? find_held_lock+0x35/0x1d0 [ 34.312301] ? __do_page_fault+0x64c/0xd60 [ 34.316501] ? lock_downgrade+0x990/0x990 [ 34.320618] ? handle_mm_fault+0x410/0x8d0 [ 34.324826] ? check_same_owner+0x320/0x320 [ 34.329111] ? up_read+0x1a/0x40 [ 34.332443] ? __do_page_fault+0x3d6/0xd60 [ 34.336641] ? tun_chr_compat_ioctl+0x30/0x30 [ 34.341101] tun_chr_ioctl+0x2a/0x40 [ 34.344777] ? tun_chr_ioctl+0x2a/0x40 [ 34.348632] do_vfs_ioctl+0x1b1/0x1520 [ 34.352487] ? ioctl_preallocate+0x2b0/0x2b0 [ 34.356860] ? selinux_capable+0x40/0x40 [ 34.360887] ? putname+0xf3/0x130 [ 34.364309] ? do_sys_open+0x320/0x6d0 [ 34.368167] ? security_file_ioctl+0x89/0xb0 [ 34.372540] SyS_ioctl+0x8f/0xc0 [ 34.375879] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 34.380601] RIP: 0033:0x443dc9 [ 34.383756] RSP: 002b:00007ffd18cf0658 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 34.391430] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443dc9 [ 34.398680] RDX: 0000000020927fd8 RSI: 00000000400454ca RDI: 0000000000000006 [ 34.405914] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 34.413150] R10: 0000000000000000 R11: 0000000000000207 R12: 33e9c828679bfde5 [ 34.420386] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000