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-7,10.128.15.195' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 40.990308] ================================================================== [ 40.997723] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 41.004704] Write of size 8 at addr ffff8801c00836c8 by task syzkaller210948/3037 [ 41.012287] [ 41.013886] CPU: 1 PID: 3037 Comm: syzkaller210948 Not tainted 4.13.0+ #71 [ 41.020864] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.030186] Call Trace: [ 41.032744] dump_stack+0x194/0x257 [ 41.036349] ? arch_local_irq_restore+0x53/0x53 [ 41.040987] ? show_regs_print_info+0x65/0x65 [ 41.045456] ? __internal_add_timer+0x275/0x2d0 [ 41.050098] print_address_description+0x73/0x250 [ 41.054909] ? __internal_add_timer+0x275/0x2d0 [ 41.059549] kasan_report+0x24e/0x340 [ 41.063326] __asan_report_store8_noabort+0x17/0x20 [ 41.068320] __internal_add_timer+0x275/0x2d0 [ 41.072795] ? calc_wheel_index+0x200/0x200 [ 41.077098] mod_timer+0x622/0x15b0 [ 41.080706] ? mod_timer_pending+0x14e0/0x14e0 [ 41.085257] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.090243] ? trace_hardirqs_on+0xd/0x10 [ 41.094365] ? _crng_backtrack_protect+0xd9/0x130 [ 41.099186] ? __lock_is_held+0xbc/0x140 [ 41.103220] ? __lockdep_init_map+0xe4/0x650 [ 41.107603] ? lockdep_init_map+0x3d/0x70 [ 41.111722] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.116714] ? init_timer_key+0x126/0x3b0 [ 41.120836] ? try_to_del_timer_sync+0x120/0x120 [ 41.125562] ? round_jiffies_up+0xce/0x100 [ 41.129777] ? __round_jiffies_up_relative+0x150/0x150 [ 41.135032] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.139947] __tun_chr_ioctl+0x1b2c/0x3d70 [ 41.144167] ? tun_select_queue+0x580/0x580 [ 41.148468] ? lock_downgrade+0x990/0x990 [ 41.152625] ? check_same_owner+0x320/0x320 [ 41.156921] ? __handle_mm_fault+0x3840/0x3840 [ 41.161471] ? vmacache_find+0x61/0x270 [ 41.165419] ? tun_chr_compat_ioctl+0x30/0x30 [ 41.169882] tun_chr_ioctl+0x2a/0x40 [ 41.173567] ? tun_chr_ioctl+0x2a/0x40 [ 41.177437] do_vfs_ioctl+0x1b1/0x1530 [ 41.181302] ? ioctl_preallocate+0x2b0/0x2b0 [ 41.185686] ? selinux_capable+0x40/0x40 [ 41.189720] ? putname+0xf3/0x130 [ 41.193147] ? do_sys_open+0x320/0x6d0 [ 41.197012] ? security_file_ioctl+0x7d/0xb0 [ 41.201385] ? security_file_ioctl+0x89/0xb0 [ 41.205782] SyS_ioctl+0x8f/0xc0 [ 41.209136] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.213858] RIP: 0033:0x443d79 [ 41.217024] RSP: 002b:00007ffc46b7c738 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 41.224716] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d79 [ 41.231956] RDX: 0000000020c1efd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 41.239198] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 41.246435] R10: 0000000000000000 R11: 0000000000000202 R12: c42fa1e80c1bbd15 [ 41.253674] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 41.260946] [ 41.262543] Allocated by task 3037: [ 41.266138] save_stack_trace+0x16/0x20 [ 41.270081] save_stack+0x43/0xd0 [ 41.273499] kasan_kmalloc+0xad/0xe0 [ 41.277181] __kmalloc_node+0x47/0x70 [ 41.280950] kvmalloc_node+0x64/0xd0 [ 41.284633] alloc_netdev_mqs+0x16e/0xed0 [ 41.288748] __tun_chr_ioctl+0x12be/0x3d70 [ 41.292949] tun_chr_ioctl+0x2a/0x40 [ 41.296631] do_vfs_ioctl+0x1b1/0x1530 [ 41.300485] SyS_ioctl+0x8f/0xc0 [ 41.303823] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.308544] [ 41.310141] Freed by task 3037: [ 41.313389] save_stack_trace+0x16/0x20 [ 41.317330] save_stack+0x43/0xd0 [ 41.320752] kasan_slab_free+0x71/0xc0 [ 41.324605] kfree+0xca/0x250 [ 41.327678] kvfree+0x36/0x60 [ 41.330752] free_netdev+0x2cf/0x360 [ 41.334435] __tun_chr_ioctl+0x2d30/0x3d70 [ 41.338639] tun_chr_ioctl+0x2a/0x40 [ 41.342322] do_vfs_ioctl+0x1b1/0x1530 [ 41.346178] SyS_ioctl+0x8f/0xc0 [ 41.349514] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.354243] [ 41.355843] The buggy address belongs to the object at ffff8801c00802c0 [ 41.355843] which belongs to the cache kmalloc-16384 of size 16384 [ 41.368819] The buggy address is located 13320 bytes inside of [ 41.368819] 16384-byte region [ffff8801c00802c0, ffff8801c00842c0) [ 41.381007] The buggy address belongs to the page: [ 41.385905] page:ffffea0007002000 count:1 mapcount:0 mapping:ffff8801c00802c0 index:0x0 compound_mapcount: 0 [ 41.395849] flags: 0x200000000008100(slab|head) [ 41.400489] raw: 0200000000008100 ffff8801c00802c0 0000000000000000 0000000100000001 [ 41.408745] raw: ffffea0007506220 ffffea0007316420 ffff8801dac02200 0000000000000000 [ 41.416590] page dumped because: kasan: bad access detected [ 41.422263] [ 41.423858] Memory state around the buggy address: [ 41.428763] ffff8801c0083580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.436091] ffff8801c0083600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.443416] >ffff8801c0083680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.450742] ^ [ 41.456418] ffff8801c0083700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.463745] ffff8801c0083780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.471070] ================================================================== [ 41.478393] Disabling lock debugging due to kernel taint [ 41.483805] Kernel panic - not syncing: panic_on_warn set ... [ 41.483805] [ 41.491128] CPU: 1 PID: 3037 Comm: syzkaller210948 Tainted: G B 4.13.0+ #71 [ 41.499316] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.508632] Call Trace: [ 41.511183] dump_stack+0x194/0x257 [ 41.514775] ? arch_local_irq_restore+0x53/0x53 [ 41.519409] ? vprintk_default+0x28/0x30 [ 41.523440] ? __internal_add_timer+0x1a0/0x2d0 [ 41.528075] panic+0x1e4/0x417 [ 41.531232] ? __warn+0x1d9/0x1d9 [ 41.534655] ? __internal_add_timer+0x275/0x2d0 [ 41.539286] kasan_end_report+0x50/0x50 [ 41.543222] kasan_report+0x137/0x340 [ 41.546990] __asan_report_store8_noabort+0x17/0x20 [ 41.551968] __internal_add_timer+0x275/0x2d0 [ 41.556430] ? calc_wheel_index+0x200/0x200 [ 41.560720] mod_timer+0x622/0x15b0 [ 41.564313] ? mod_timer_pending+0x14e0/0x14e0 [ 41.568856] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 41.573837] ? trace_hardirqs_on+0xd/0x10 [ 41.577951] ? _crng_backtrack_protect+0xd9/0x130 [ 41.582761] ? __lock_is_held+0xbc/0x140 [ 41.586787] ? __lockdep_init_map+0xe4/0x650 [ 41.591161] ? lockdep_init_map+0x3d/0x70 [ 41.595274] ? rcu_read_lock_sched_held+0x108/0x120 [ 41.600261] ? init_timer_key+0x126/0x3b0 [ 41.604372] ? try_to_del_timer_sync+0x120/0x120 [ 41.609091] ? round_jiffies_up+0xce/0x100 [ 41.613304] ? __round_jiffies_up_relative+0x150/0x150 [ 41.618561] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.623458] __tun_chr_ioctl+0x1b2c/0x3d70 [ 41.627660] ? tun_select_queue+0x580/0x580 [ 41.631949] ? lock_downgrade+0x990/0x990 [ 41.636075] ? check_same_owner+0x320/0x320 [ 41.640376] ? __handle_mm_fault+0x3840/0x3840 [ 41.644930] ? vmacache_find+0x61/0x270 [ 41.648871] ? tun_chr_compat_ioctl+0x30/0x30 [ 41.653328] tun_chr_ioctl+0x2a/0x40 [ 41.657009] ? tun_chr_ioctl+0x2a/0x40 [ 41.660859] do_vfs_ioctl+0x1b1/0x1530 [ 41.664711] ? ioctl_preallocate+0x2b0/0x2b0 [ 41.669086] ? selinux_capable+0x40/0x40 [ 41.673111] ? putname+0xf3/0x130 [ 41.676527] ? do_sys_open+0x320/0x6d0 [ 41.680386] ? security_file_ioctl+0x7d/0xb0 [ 41.684757] ? security_file_ioctl+0x89/0xb0 [ 41.689131] SyS_ioctl+0x8f/0xc0 [ 41.692464] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.697184] RIP: 0033:0x443d79 [ 41.700347] RSP: 002b:00007ffc46b7c738 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 [ 41.708019] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443d79 [ 41.715253] RDX: 0000000020c1efd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 41.722493] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 41.729725] R10: 0000000000000000 R11: 0000000000000202 R12: c42fa1e80c1bbd15 [ 41.736956] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000