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-3,10.128.0.45' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 45.752058] ================================================================== [ 45.759518] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 45.766510] Write of size 8 at addr ffff8801cbc0b6c8 by task syzkaller878950/3044 [ 45.774103] [ 45.775709] CPU: 0 PID: 3044 Comm: syzkaller878950 Not tainted 4.13.0+ #69 [ 45.782693] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 45.792039] Call Trace: [ 45.794612] dump_stack+0x194/0x257 [ 45.798239] ? arch_local_irq_restore+0x53/0x53 [ 45.802892] ? show_regs_print_info+0x65/0x65 [ 45.807390] ? __internal_add_timer+0x275/0x2d0 [ 45.812047] print_address_description+0x73/0x250 [ 45.816874] ? __internal_add_timer+0x275/0x2d0 [ 45.821540] kasan_report+0x24e/0x340 [ 45.825335] __asan_report_store8_noabort+0x17/0x20 [ 45.830331] __internal_add_timer+0x275/0x2d0 [ 45.834805] ? calc_wheel_index+0x200/0x200 [ 45.839123] mod_timer+0x622/0x15b0 [ 45.842749] ? mod_timer_pending+0x14e0/0x14e0 [ 45.847321] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 45.852319] ? trace_hardirqs_on+0xd/0x10 [ 45.856455] ? _crng_backtrack_protect+0xd9/0x130 [ 45.861281] ? __lock_is_held+0xbc/0x140 [ 45.865321] ? __lockdep_init_map+0xe4/0x650 [ 45.869718] ? lockdep_init_map+0x3d/0x70 [ 45.873846] ? rcu_read_lock_sched_held+0x108/0x120 [ 45.878839] ? init_timer_key+0x126/0x3b0 [ 45.882964] ? try_to_del_timer_sync+0x120/0x120 [ 45.887698] ? round_jiffies_up+0xce/0x100 [ 45.891908] ? __round_jiffies_up_relative+0x150/0x150 [ 45.897174] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 45.902102] __tun_chr_ioctl+0x1b2c/0x3d70 [ 45.906331] ? unwind_get_return_address+0x64/0xa0 [ 45.911251] ? tun_select_queue+0x580/0x580 [ 45.915568] ? putname+0xee/0x130 [ 45.919003] ? save_stack+0xa3/0xd0 [ 45.922609] ? save_stack_trace+0x16/0x20 [ 45.926735] ? save_stack+0x43/0xd0 [ 45.930338] ? kasan_slab_free+0x71/0xc0 [ 45.934375] ? kmem_cache_free+0x77/0x280 [ 45.938501] ? putname+0xee/0x130 [ 45.941945] ? __lock_is_held+0xbc/0x140 [ 45.946002] ? check_same_owner+0x320/0x320 [ 45.950310] ? tun_chr_compat_ioctl+0x30/0x30 [ 45.954781] tun_chr_ioctl+0x2a/0x40 [ 45.958470] ? tun_chr_ioctl+0x2a/0x40 [ 45.962335] do_vfs_ioctl+0x1b1/0x1530 [ 45.966206] ? ioctl_preallocate+0x2b0/0x2b0 [ 45.970601] ? selinux_capable+0x40/0x40 [ 45.974642] ? putname+0xf3/0x130 [ 45.978084] ? do_sys_open+0x320/0x6d0 [ 45.981965] ? security_file_ioctl+0x7d/0xb0 [ 45.986344] ? security_file_ioctl+0x89/0xb0 [ 45.990730] SyS_ioctl+0x8f/0xc0 [ 45.994078] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 45.998810] RIP: 0033:0x443db9 [ 46.001973] RSP: 002b:00007ffd7fa06f28 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 46.009657] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 46.016904] RDX: 0000000020000fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 46.024149] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 46.031394] R10: 0000000000000000 R11: 0000000000000202 R12: a1d15a479d91caa6 [ 46.038638] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 46.045911] [ 46.047516] Allocated by task 3044: [ 46.051120] save_stack_trace+0x16/0x20 [ 46.055071] save_stack+0x43/0xd0 [ 46.058497] kasan_kmalloc+0xad/0xe0 [ 46.062184] __kmalloc_node+0x47/0x70 [ 46.065956] kvmalloc_node+0x64/0xd0 [ 46.069644] alloc_netdev_mqs+0x16e/0xed0 [ 46.073774] __tun_chr_ioctl+0x12be/0x3d70 [ 46.078002] tun_chr_ioctl+0x2a/0x40 [ 46.081689] do_vfs_ioctl+0x1b1/0x1530 [ 46.085550] SyS_ioctl+0x8f/0xc0 [ 46.088888] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.093619] [ 46.095220] Freed by task 3044: [ 46.098473] save_stack_trace+0x16/0x20 [ 46.102424] save_stack+0x43/0xd0 [ 46.105848] kasan_slab_free+0x71/0xc0 [ 46.109707] kfree+0xca/0x250 [ 46.112788] kvfree+0x36/0x60 [ 46.115882] free_netdev+0x2cf/0x360 [ 46.119583] __tun_chr_ioctl+0x2d30/0x3d70 [ 46.123796] tun_chr_ioctl+0x2a/0x40 [ 46.127483] do_vfs_ioctl+0x1b1/0x1530 [ 46.131355] SyS_ioctl+0x8f/0xc0 [ 46.134696] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.139419] [ 46.141018] The buggy address belongs to the object at ffff8801cbc082c0 [ 46.141018] which belongs to the cache kmalloc-16384 of size 16384 [ 46.154005] The buggy address is located 13320 bytes inside of [ 46.154005] 16384-byte region [ffff8801cbc082c0, ffff8801cbc0c2c0) [ 46.166243] The buggy address belongs to the page: [ 46.171190] page:ffffea00072f0200 count:1 mapcount:0 mapping:ffff8801cbc082c0 index:0x0 compound_mapcount: 0 [ 46.181185] flags: 0x200000000008100(slab|head) [ 46.185852] raw: 0200000000008100 ffff8801cbc082c0 0000000000000000 0000000100000001 [ 46.193733] raw: ffffea00074fdc20 ffffea0007312620 ffff8801dac02200 0000000000000000 [ 46.201612] page dumped because: kasan: bad access detected [ 46.207299] [ 46.208902] Memory state around the buggy address: [ 46.213812] ffff8801cbc0b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.221147] ffff8801cbc0b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.228482] >ffff8801cbc0b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.235824] ^ [ 46.241510] ffff8801cbc0b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.248844] ffff8801cbc0b780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 46.256176] ================================================================== [ 46.263505] Disabling lock debugging due to kernel taint [ 46.269114] Kernel panic - not syncing: panic_on_warn set ... [ 46.269114] [ 46.276454] CPU: 0 PID: 3044 Comm: syzkaller878950 Tainted: G B 4.13.0+ #69 [ 46.284649] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 46.293975] Call Trace: [ 46.296547] dump_stack+0x194/0x257 [ 46.300149] ? arch_local_irq_restore+0x53/0x53 [ 46.304796] ? vprintk_default+0x28/0x30 [ 46.309193] ? __internal_add_timer+0x250/0x2d0 [ 46.313850] panic+0x1e4/0x417 [ 46.317025] ? __warn+0x1d9/0x1d9 [ 46.320459] ? __internal_add_timer+0x275/0x2d0 [ 46.325098] kasan_end_report+0x50/0x50 [ 46.329041] kasan_report+0x137/0x340 [ 46.332814] __asan_report_store8_noabort+0x17/0x20 [ 46.337806] __internal_add_timer+0x275/0x2d0 [ 46.342293] ? calc_wheel_index+0x200/0x200 [ 46.346589] mod_timer+0x622/0x15b0 [ 46.350188] ? mod_timer_pending+0x14e0/0x14e0 [ 46.354748] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 46.359739] ? trace_hardirqs_on+0xd/0x10 [ 46.363862] ? _crng_backtrack_protect+0xd9/0x130 [ 46.368683] ? __lock_is_held+0xbc/0x140 [ 46.372715] ? __lockdep_init_map+0xe4/0x650 [ 46.377099] ? lockdep_init_map+0x3d/0x70 [ 46.381220] ? rcu_read_lock_sched_held+0x108/0x120 [ 46.386209] ? init_timer_key+0x126/0x3b0 [ 46.390328] ? try_to_del_timer_sync+0x120/0x120 [ 46.395053] ? round_jiffies_up+0xce/0x100 [ 46.399257] ? __round_jiffies_up_relative+0x150/0x150 [ 46.404512] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 46.409417] __tun_chr_ioctl+0x1b2c/0x3d70 [ 46.413631] ? unwind_get_return_address+0x64/0xa0 [ 46.418535] ? tun_select_queue+0x580/0x580 [ 46.422838] ? putname+0xee/0x130 [ 46.426263] ? save_stack+0xa3/0xd0 [ 46.429863] ? save_stack_trace+0x16/0x20 [ 46.433978] ? save_stack+0x43/0xd0 [ 46.437573] ? kasan_slab_free+0x71/0xc0 [ 46.441602] ? kmem_cache_free+0x77/0x280 [ 46.445718] ? putname+0xee/0x130 [ 46.449145] ? __lock_is_held+0xbc/0x140 [ 46.453186] ? check_same_owner+0x320/0x320 [ 46.457484] ? tun_chr_compat_ioctl+0x30/0x30 [ 46.461948] tun_chr_ioctl+0x2a/0x40 [ 46.465635] ? tun_chr_ioctl+0x2a/0x40 [ 46.469495] do_vfs_ioctl+0x1b1/0x1530 [ 46.473355] ? ioctl_preallocate+0x2b0/0x2b0 [ 46.477739] ? selinux_capable+0x40/0x40 [ 46.481774] ? putname+0xf3/0x130 [ 46.485199] ? do_sys_open+0x320/0x6d0 [ 46.489063] ? security_file_ioctl+0x7d/0xb0 [ 46.493444] ? security_file_ioctl+0x89/0xb0 [ 46.497826] SyS_ioctl+0x8f/0xc0 [ 46.501170] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 46.505896] RIP: 0033:0x443db9 [ 46.509059] RSP: 002b:00007ffd7fa06f28 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 46.516743] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 46.523997] RDX: 0000000020000fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 46.531260] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 46.538524] R10: 0000000000000000 R11: 0000000000000202 R12: a1d15a479d91caa6 [ 46.545777] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000