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-5,10.128.0.7' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 56.659851] ================================================================== [ 56.667290] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 56.674276] Write of size 8 at addr ffff8801cc5136c8 by task syzkaller612974/3037 [ 56.681878] [ 56.683481] CPU: 0 PID: 3037 Comm: syzkaller612974 Not tainted 4.13.0+ #71 [ 56.690462] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 56.699801] Call Trace: [ 56.702382] dump_stack+0x194/0x257 [ 56.705985] ? arch_local_irq_restore+0x53/0x53 [ 56.710628] ? show_regs_print_info+0x65/0x65 [ 56.715098] ? __internal_add_timer+0x275/0x2d0 [ 56.719783] print_address_description+0x73/0x250 [ 56.724629] ? __internal_add_timer+0x275/0x2d0 [ 56.729272] kasan_report+0x24e/0x340 [ 56.733148] __asan_report_store8_noabort+0x17/0x20 [ 56.738137] __internal_add_timer+0x275/0x2d0 [ 56.742621] ? calc_wheel_index+0x200/0x200 [ 56.746927] mod_timer+0x622/0x15b0 [ 56.750536] ? mod_timer_pending+0x14e0/0x14e0 [ 56.755094] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 56.760087] ? trace_hardirqs_on+0xd/0x10 [ 56.764231] ? _crng_backtrack_protect+0xd9/0x130 [ 56.769053] ? __lock_is_held+0xbc/0x140 [ 56.773105] ? __lockdep_init_map+0xe4/0x650 [ 56.777489] ? lockdep_init_map+0x3d/0x70 [ 56.781610] ? rcu_read_lock_sched_held+0x108/0x120 [ 56.786598] ? init_timer_key+0x126/0x3b0 [ 56.790721] ? try_to_del_timer_sync+0x120/0x120 [ 56.795451] ? round_jiffies_up+0xce/0x100 [ 56.799656] ? __round_jiffies_up_relative+0x150/0x150 [ 56.804923] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 56.809835] __tun_chr_ioctl+0x1b2c/0x3d70 [ 56.814079] ? tun_select_queue+0x580/0x580 [ 56.818409] ? lock_downgrade+0x990/0x990 [ 56.822593] ? check_same_owner+0x320/0x320 [ 56.826894] ? __handle_mm_fault+0x3840/0x3840 [ 56.831446] ? vmacache_find+0x61/0x270 [ 56.835405] ? tun_chr_compat_ioctl+0x30/0x30 [ 56.839880] tun_chr_ioctl+0x2a/0x40 [ 56.843566] ? tun_chr_ioctl+0x2a/0x40 [ 56.847441] do_vfs_ioctl+0x1b1/0x1530 [ 56.851308] ? ioctl_preallocate+0x2b0/0x2b0 [ 56.855694] ? selinux_capable+0x40/0x40 [ 56.859733] ? putname+0xf3/0x130 [ 56.863161] ? do_sys_open+0x320/0x6d0 [ 56.867032] ? security_file_ioctl+0x7d/0xb0 [ 56.871413] ? security_file_ioctl+0x89/0xb0 [ 56.875808] SyS_ioctl+0x8f/0xc0 [ 56.879155] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 56.883881] RIP: 0033:0x443db9 [ 56.887042] RSP: 002b:00007ffc37e2cb68 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 56.894726] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 56.901968] RDX: 0000000020906fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 56.909210] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 56.916450] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000401aa0 [ 56.923690] R13: 0000000000401b30 R14: 0000000000000000 R15: 0000000000000000 [ 56.930968] [ 56.932567] Allocated by task 3037: [ 56.936169] save_stack_trace+0x16/0x20 [ 56.940112] save_stack+0x43/0xd0 [ 56.943535] kasan_kmalloc+0xad/0xe0 [ 56.947219] __kmalloc_node+0x47/0x70 [ 56.950991] kvmalloc_node+0x64/0xd0 [ 56.954676] alloc_netdev_mqs+0x16e/0xed0 [ 56.958800] __tun_chr_ioctl+0x12be/0x3d70 [ 56.963005] tun_chr_ioctl+0x2a/0x40 [ 56.966691] do_vfs_ioctl+0x1b1/0x1530 [ 56.970546] SyS_ioctl+0x8f/0xc0 [ 56.973883] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 56.978606] [ 56.980215] Freed by task 3037: [ 56.983465] save_stack_trace+0x16/0x20 [ 56.987409] save_stack+0x43/0xd0 [ 56.990843] kasan_slab_free+0x71/0xc0 [ 56.994698] kfree+0xca/0x250 [ 56.997771] kvfree+0x36/0x60 [ 57.000848] free_netdev+0x2cf/0x360 [ 57.004531] __tun_chr_ioctl+0x2d30/0x3d70 [ 57.008737] tun_chr_ioctl+0x2a/0x40 [ 57.012422] do_vfs_ioctl+0x1b1/0x1530 [ 57.016277] SyS_ioctl+0x8f/0xc0 [ 57.019614] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 57.024335] [ 57.025935] The buggy address belongs to the object at ffff8801cc5102c0 [ 57.025935] which belongs to the cache kmalloc-16384 of size 16384 [ 57.038909] The buggy address is located 13320 bytes inside of [ 57.038909] 16384-byte region [ffff8801cc5102c0, ffff8801cc5142c0) [ 57.051104] The buggy address belongs to the page: [ 57.056006] page:ffffea0007314400 count:1 mapcount:0 mapping:ffff8801cc5102c0 index:0x0 compound_mapcount: 0 [ 57.065983] flags: 0x200000000008100(slab|head) [ 57.070624] raw: 0200000000008100 ffff8801cc5102c0 0000000000000000 0000000100000001 [ 57.078482] raw: ffffea00073f6420 ffffea000732f620 ffff8801dac02200 0000000000000000 [ 57.086342] page dumped because: kasan: bad access detected [ 57.092022] [ 57.093617] Memory state around the buggy address: [ 57.098517] ffff8801cc513580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.105845] ffff8801cc513600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.113174] >ffff8801cc513680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.120501] ^ [ 57.126208] ffff8801cc513700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.133548] ffff8801cc513780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 57.140893] ================================================================== [ 57.148218] Disabling lock debugging due to kernel taint [ 57.153632] Kernel panic - not syncing: panic_on_warn set ... [ 57.153632] [ 57.160966] CPU: 0 PID: 3037 Comm: syzkaller612974 Tainted: G B 4.13.0+ #71 [ 57.169155] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.178473] Call Trace: [ 57.181035] dump_stack+0x194/0x257 [ 57.184631] ? arch_local_irq_restore+0x53/0x53 [ 57.189278] ? vprintk_default+0x28/0x30 [ 57.193307] ? __internal_add_timer+0x1a0/0x2d0 [ 57.197947] panic+0x1e4/0x417 [ 57.201110] ? __warn+0x1d9/0x1d9 [ 57.204574] ? __internal_add_timer+0x275/0x2d0 [ 57.209226] kasan_end_report+0x50/0x50 [ 57.213165] kasan_report+0x137/0x340 [ 57.216934] __asan_report_store8_noabort+0x17/0x20 [ 57.221922] __internal_add_timer+0x275/0x2d0 [ 57.226384] ? calc_wheel_index+0x200/0x200 [ 57.230677] mod_timer+0x622/0x15b0 [ 57.234272] ? mod_timer_pending+0x14e0/0x14e0 [ 57.238820] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 57.243819] ? trace_hardirqs_on+0xd/0x10 [ 57.247931] ? _crng_backtrack_protect+0xd9/0x130 [ 57.252746] ? __lock_is_held+0xbc/0x140 [ 57.256794] ? __lockdep_init_map+0xe4/0x650 [ 57.261168] ? lockdep_init_map+0x3d/0x70 [ 57.265283] ? rcu_read_lock_sched_held+0x108/0x120 [ 57.270269] ? init_timer_key+0x126/0x3b0 [ 57.274394] ? try_to_del_timer_sync+0x120/0x120 [ 57.279118] ? round_jiffies_up+0xce/0x100 [ 57.283318] ? __round_jiffies_up_relative+0x150/0x150 [ 57.288558] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 57.293630] __tun_chr_ioctl+0x1b2c/0x3d70 [ 57.297835] ? tun_select_queue+0x580/0x580 [ 57.302128] ? lock_downgrade+0x990/0x990 [ 57.306257] ? check_same_owner+0x320/0x320 [ 57.310561] ? __handle_mm_fault+0x3840/0x3840 [ 57.315111] ? vmacache_find+0x61/0x270 [ 57.319051] ? tun_chr_compat_ioctl+0x30/0x30 [ 57.323510] tun_chr_ioctl+0x2a/0x40 [ 57.327190] ? tun_chr_ioctl+0x2a/0x40 [ 57.331046] do_vfs_ioctl+0x1b1/0x1530 [ 57.334900] ? ioctl_preallocate+0x2b0/0x2b0 [ 57.339287] ? selinux_capable+0x40/0x40 [ 57.343328] ? putname+0xf3/0x130 [ 57.346758] ? do_sys_open+0x320/0x6d0 [ 57.350614] ? security_file_ioctl+0x7d/0xb0 [ 57.354985] ? security_file_ioctl+0x89/0xb0 [ 57.359358] SyS_ioctl+0x8f/0xc0 [ 57.362697] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 57.367418] RIP: 0033:0x443db9 [ 57.370573] RSP: 002b:00007ffc37e2cb68 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 57.378245] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443db9 [ 57.385488] RDX: 0000000020906fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 57.392731] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 57.399967] R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000401aa0 [ 57.407201] R13: 0000000000401b30 R14: 0000000000000000 R15: 0000000000000000