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.13' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 41.365872] ================================================================== [ 41.367139] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 41.368147] Write of size 8 at addr ffff8801d085b640 by task syzkaller037287/3004 [ 41.369195] [ 41.369459] CPU: 0 PID: 3004 Comm: syzkaller037287 Not tainted 4.13.0-rc7+ #59 [ 41.370451] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.371720] Call Trace: [ 41.372079] dump_stack+0x194/0x257 [ 41.372570] ? arch_local_irq_restore+0x53/0x53 [ 41.373208] ? show_regs_print_info+0x65/0x65 [ 41.373830] ? __kernel_text_address+0xae/0xe0 [ 41.374441] ? __internal_add_timer+0x275/0x2d0 [ 41.375185] print_address_description+0x73/0x250 [ 41.375867] ? __internal_add_timer+0x275/0x2d0 [ 41.376494] kasan_report+0x24e/0x340 [ 41.377203] __asan_report_store8_noabort+0x17/0x20 [ 41.377891] __internal_add_timer+0x275/0x2d0 [ 41.378535] ? calc_wheel_index+0x200/0x200 [ 41.379171] mod_timer+0x622/0x15b0 [ 41.379763] ? mod_timer_pending+0x14e0/0x14e0 [ 41.380401] ? __lock_is_held+0xb6/0x140 [ 41.381036] ? __lock_is_held+0xb6/0x140 [ 41.381590] ? lockdep_init_map+0xe4/0x650 [ 41.382164] ? init_timer_key+0x126/0x3b0 [ 41.382725] ? try_to_del_timer_sync+0x120/0x120 [ 41.383360] ? round_jiffies_up+0xce/0x100 [ 41.383929] ? __round_jiffies_up_relative+0x150/0x150 [ 41.384725] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.385524] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 41.386362] __tun_chr_ioctl+0x1b20/0x3d60 [ 41.390575] ? tun_select_queue+0x580/0x580 [ 41.394870] ? check_noncircular+0x20/0x20 [ 41.399079] ? get_unused_fd_flags+0x190/0x190 [ 41.403640] ? __handle_mm_fault+0x577/0x3860 [ 41.408105] ? check_noncircular+0x20/0x20 [ 41.412327] ? check_noncircular+0x20/0x20 [ 41.416532] ? __pmd_alloc+0x4e0/0x4e0 [ 41.420427] ? check_same_owner+0x320/0x320 [ 41.424729] ? handle_mm_fault+0x23e/0x860 [ 41.428957] ? tun_chr_compat_ioctl+0x30/0x30 [ 41.433419] tun_chr_ioctl+0x2a/0x40 [ 41.437102] ? tun_chr_ioctl+0x2a/0x40 [ 41.440962] do_vfs_ioctl+0x1b1/0x1520 [ 41.444824] ? ioctl_preallocate+0x2b0/0x2b0 [ 41.449208] ? selinux_capable+0x40/0x40 [ 41.453245] ? __handle_mm_fault+0x3860/0x3860 [ 41.457810] ? security_file_ioctl+0x7d/0xb0 [ 41.462187] ? security_file_ioctl+0x89/0xb0 [ 41.466572] SyS_ioctl+0x8f/0xc0 [ 41.469915] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.474637] RIP: 0033:0x443dd9 [ 41.477794] RSP: 002b:00007ffe15bd4ec8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 41.485500] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443dd9 [ 41.492765] RDX: 0000000020074000 RSI: 00000000400454ca RDI: 0000000000000006 [ 41.500005] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 41.507244] R10: 0000000000000000 R11: 0000000000000207 R12: b9170933d928a07f [ 41.514482] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000 [ 41.521751] [ 41.523350] Allocated by task 3004: [ 41.526952] save_stack_trace+0x16/0x20 [ 41.530896] save_stack+0x43/0xd0 [ 41.534319] kasan_kmalloc+0xad/0xe0 [ 41.538008] __kmalloc_node+0x47/0x70 [ 41.541777] kvmalloc_node+0x64/0xd0 [ 41.545459] alloc_netdev_mqs+0x16e/0xed0 [ 41.549585] __tun_chr_ioctl+0x12b2/0x3d60 [ 41.553787] tun_chr_ioctl+0x2a/0x40 [ 41.557467] do_vfs_ioctl+0x1b1/0x1520 [ 41.561323] SyS_ioctl+0x8f/0xc0 [ 41.564660] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.569385] [ 41.570980] Freed by task 3004: [ 41.574227] save_stack_trace+0x16/0x20 [ 41.578168] save_stack+0x43/0xd0 [ 41.581588] kasan_slab_free+0x71/0xc0 [ 41.585442] kfree+0xca/0x250 [ 41.588536] kvfree+0x36/0x60 [ 41.591622] free_netdev+0x2cf/0x360 [ 41.595304] __tun_chr_ioctl+0x2d24/0x3d60 [ 41.599509] tun_chr_ioctl+0x2a/0x40 [ 41.603188] do_vfs_ioctl+0x1b1/0x1520 [ 41.607041] SyS_ioctl+0x8f/0xc0 [ 41.610377] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.615097] [ 41.616693] The buggy address belongs to the object at ffff8801d0858300 [ 41.616693] which belongs to the cache kmalloc-16384 of size 16384 [ 41.629663] The buggy address is located 13120 bytes inside of [ 41.629663] 16384-byte region [ffff8801d0858300, ffff8801d085c300) [ 41.641852] The buggy address belongs to the page: [ 41.646750] page:ffffea0007421600 count:1 mapcount:0 mapping:ffff8801d0858300 index:0x0 compound_mapcount: 0 [ 41.656686] flags: 0x200000000008100(slab|head) [ 41.661325] raw: 0200000000008100 ffff8801d0858300 0000000000000000 0000000100000001 [ 41.669173] raw: ffffea000762f420 ffffea0007549e20 ffff8801dac02200 0000000000000000 [ 41.677017] page dumped because: kasan: bad access detected [ 41.682700] [ 41.684293] Memory state around the buggy address: [ 41.689199] ffff8801d085b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.696534] ffff8801d085b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.703862] >ffff8801d085b600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.711273] ^ [ 41.716690] ffff8801d085b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.724018] ffff8801d085b700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 41.731344] ================================================================== [ 41.738668] Disabling lock debugging due to kernel taint [ 41.744084] Kernel panic - not syncing: panic_on_warn set ... [ 41.744084] [ 41.751413] CPU: 0 PID: 3004 Comm: syzkaller037287 Tainted: G B 4.13.0-rc7+ #59 [ 41.759954] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.769275] Call Trace: [ 41.771837] dump_stack+0x194/0x257 [ 41.775435] ? arch_local_irq_restore+0x53/0x53 [ 41.780074] ? kasan_end_report+0x32/0x50 [ 41.784190] ? lock_downgrade+0x990/0x990 [ 41.788305] ? __internal_add_timer+0x190/0x2d0 [ 41.792945] panic+0x1e4/0x417 [ 41.796109] ? __warn+0x1d9/0x1d9 [ 41.799533] ? __internal_add_timer+0x275/0x2d0 [ 41.804175] kasan_end_report+0x50/0x50 [ 41.808118] kasan_report+0x137/0x340 [ 41.811889] __asan_report_store8_noabort+0x17/0x20 [ 41.816873] __internal_add_timer+0x275/0x2d0 [ 41.821335] ? calc_wheel_index+0x200/0x200 [ 41.825629] mod_timer+0x622/0x15b0 [ 41.829227] ? mod_timer_pending+0x14e0/0x14e0 [ 41.833774] ? __lock_is_held+0xb6/0x140 [ 41.837806] ? __lock_is_held+0xb6/0x140 [ 41.841836] ? lockdep_init_map+0xe4/0x650 [ 41.846040] ? init_timer_key+0x126/0x3b0 [ 41.850155] ? try_to_del_timer_sync+0x120/0x120 [ 41.854876] ? round_jiffies_up+0xce/0x100 [ 41.859079] ? __round_jiffies_up_relative+0x150/0x150 [ 41.864330] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 41.869230] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 41.874740] __tun_chr_ioctl+0x1b20/0x3d60 [ 41.878947] ? tun_select_queue+0x580/0x580 [ 41.883241] ? check_noncircular+0x20/0x20 [ 41.887443] ? get_unused_fd_flags+0x190/0x190 [ 41.892006] ? __handle_mm_fault+0x577/0x3860 [ 41.896477] ? check_noncircular+0x20/0x20 [ 41.900679] ? check_noncircular+0x20/0x20 [ 41.904879] ? __pmd_alloc+0x4e0/0x4e0 [ 41.908744] ? check_same_owner+0x320/0x320 [ 41.913041] ? handle_mm_fault+0x23e/0x860 [ 41.917258] ? tun_chr_compat_ioctl+0x30/0x30 [ 41.921730] tun_chr_ioctl+0x2a/0x40 [ 41.925411] ? tun_chr_ioctl+0x2a/0x40 [ 41.929266] do_vfs_ioctl+0x1b1/0x1520 [ 41.933120] ? ioctl_preallocate+0x2b0/0x2b0 [ 41.937495] ? selinux_capable+0x40/0x40 [ 41.941526] ? __handle_mm_fault+0x3860/0x3860 [ 41.946079] ? security_file_ioctl+0x7d/0xb0 [ 41.950451] ? security_file_ioctl+0x89/0xb0 [ 41.954825] SyS_ioctl+0x8f/0xc0 [ 41.958164] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.962903] RIP: 0033:0x443dd9 [ 41.966060] RSP: 002b:00007ffe15bd4ec8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 41.973741] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000443dd9 [ 41.980977] RDX: 0000000020074000 RSI: 00000000400454ca RDI: 0000000000000006 [ 41.988213] RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 [ 41.995449] R10: 0000000000000000 R11: 0000000000000207 R12: b9170933d928a07f [ 42.002686] R13: 74656e2f7665642f R14: 0000000000000000 R15: 0000000000000000