executing program executing program syzkaller login: [ 22.300464] ================================================================== [ 22.302074] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 22.303458] Write of size 8 at addr ffff88006b49b488 by task syzkaller580879/2967 [ 22.304983] [ 22.305311] CPU: 2 PID: 2967 Comm: syzkaller580879 Not tainted 4.13.0-next-20170905+ #15 [ 22.306935] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 22.308579] Call Trace: [ 22.309099] dump_stack+0x194/0x257 [ 22.309842] ? arch_local_irq_restore+0x53/0x53 [ 22.310813] ? show_regs_print_info+0x65/0x65 [ 22.311752] ? __internal_add_timer+0x275/0x2d0 [ 22.312645] print_address_description+0x73/0x250 [ 22.314135] ? __internal_add_timer+0x275/0x2d0 [ 22.315112] kasan_report+0x24e/0x340 [ 22.315925] __asan_report_store8_noabort+0x17/0x20 [ 22.316960] __internal_add_timer+0x275/0x2d0 [ 22.317885] ? calc_wheel_index+0x200/0x200 [ 22.318783] mod_timer+0x622/0x15b0 [ 22.319547] ? mod_timer_pending+0x14e0/0x14e0 [ 22.320422] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.321472] ? trace_hardirqs_on+0xd/0x10 [ 22.322324] ? _crng_backtrack_protect+0xd9/0x130 [ 22.323320] ? __lock_is_held+0xbc/0x140 [ 22.324153] ? __lockdep_init_map+0xe4/0x650 [ 22.325069] ? lockdep_init_map+0x3d/0x70 [ 22.325923] ? rcu_read_lock_sched_held+0x108/0x120 [ 22.326943] ? init_timer_key+0x126/0x3b0 [ 22.327808] ? try_to_del_timer_sync+0x120/0x120 [ 22.328771] ? round_jiffies_up+0xce/0x100 [ 22.329637] ? __round_jiffies_up_relative+0x150/0x150 [ 22.330701] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 22.331697] __tun_chr_ioctl+0x1b23/0x3d20 [ 22.332533] ? tun_chr_read_iter+0x1e0/0x1e0 [ 22.333458] ? lock_downgrade+0x990/0x990 [ 22.334286] ? check_same_owner+0x320/0x320 [ 22.335796] ? __handle_mm_fault+0x39c0/0x39c0 [ 22.336652] ? vmacache_find+0x61/0x270 [ 22.337393] ? tun_chr_compat_ioctl+0x30/0x30 [ 22.338313] tun_chr_ioctl+0x2a/0x40 [ 22.339101] ? tun_chr_ioctl+0x2a/0x40 [ 22.339891] do_vfs_ioctl+0x1b1/0x1530 [ 22.340617] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.341484] ? selinux_capable+0x40/0x40 [ 22.342312] ? putname+0xf3/0x130 [ 22.343019] ? do_sys_open+0x320/0x6d0 [ 22.343820] ? security_file_ioctl+0x7d/0xb0 [ 22.344717] ? security_file_ioctl+0x89/0xb0 [ 22.345625] SyS_ioctl+0x8f/0xc0 [ 22.346334] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.347315] RIP: 0033:0x439019 [ 22.347973] RSP: 002b:00007ffd51cdbea8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 22.349542] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439019 [ 22.351019] RDX: 0000000020822000 RSI: 00000000400454ca RDI: 0000000000000006 [ 22.352513] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 22.353966] R10: 00000000000000fd R11: 0000000000000207 R12: 5f6010a0d3dd9153 [ 22.355408] R13: 74656e2f7665642f R14: 0000000000401d00 R15: 0000000000000000 [ 22.357144] [ 22.357483] Allocated by task 2967: [ 22.358204] save_stack_trace+0x16/0x20 [ 22.358986] save_stack+0x43/0xd0 [ 22.359680] kasan_kmalloc+0xad/0xe0 [ 22.360422] __kmalloc_node+0x47/0x70 [ 22.361186] kvmalloc_node+0x64/0xd0 [ 22.361922] alloc_netdev_mqs+0x16e/0xed0 [ 22.362764] __tun_chr_ioctl+0x12be/0x3d20 [ 22.363623] tun_chr_ioctl+0x2a/0x40 [ 22.364392] do_vfs_ioctl+0x1b1/0x1530 [ 22.365195] SyS_ioctl+0x8f/0xc0 [ 22.365884] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.366819] [ 22.367159] Freed by task 2967: [ 22.367826] save_stack_trace+0x16/0x20 [ 22.368639] save_stack+0x43/0xd0 [ 22.369331] kasan_slab_free+0x71/0xc0 [ 22.370092] kfree+0xca/0x250 [ 22.370695] kvfree+0x36/0x60 [ 22.371314] free_netdev+0x2cf/0x360 [ 22.372064] __tun_chr_ioctl+0x2cf6/0x3d20 [ 22.372907] tun_chr_ioctl+0x2a/0x40 [ 22.373644] do_vfs_ioctl+0x1b1/0x1530 [ 22.374359] SyS_ioctl+0x8f/0xc0 [ 22.374987] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.375866] [ 22.376197] The buggy address belongs to the object at ffff88006b498080 [ 22.376197] which belongs to the cache kmalloc-16384 of size 16384 [ 22.379369] The buggy address is located 13320 bytes inside of [ 22.379369] 16384-byte region [ffff88006b498080, ffff88006b49c080) [ 22.381801] The buggy address belongs to the page: [ 22.382770] page:ffffea0001ad2600 count:1 mapcount:0 mapping:ffff88006b498080 index:0x0 compound_mapcount: 0 [ 22.384813] flags: 0x500000000008100(slab|head) [ 22.385768] raw: 0500000000008100 ffff88006b498080 0000000000000000 0000000100000001 [ 22.387375] raw: ffffea0001aaa420 ffffea0001a36c20 ffff88003e802200 0000000000000000 [ 22.388967] page dumped because: kasan: bad access detected [ 22.390140] [ 22.390318] Memory state around the buggy address: [ 22.390834] ffff88006b49b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.391599] ffff88006b49b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.392347] >ffff88006b49b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.393101] ^ [ 22.393476] ffff88006b49b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.394228] ffff88006b49b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.394986] ================================================================== [ 22.395752] Disabling lock debugging due to kernel taint [ 22.396308] Kernel panic - not syncing: panic_on_warn set ... [ 22.396308] [ 22.397065] CPU: 2 PID: 2967 Comm: syzkaller580879 Tainted: G B 4.13.0-next-20170905+ #15 [ 22.397949] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 22.399166] Call Trace: [ 22.399431] dump_stack+0x194/0x257 [ 22.399797] ? arch_local_irq_restore+0x53/0x53 [ 22.400261] ? vprintk_default+0x28/0x30 [ 22.400660] ? __internal_add_timer+0x1e0/0x2d0 [ 22.401125] panic+0x1e4/0x417 [ 22.401446] ? __warn+0x1d9/0x1d9 [ 22.401796] ? __internal_add_timer+0x275/0x2d0 [ 22.402256] kasan_end_report+0x50/0x50 [ 22.402645] kasan_report+0x137/0x340 [ 22.403014] __asan_report_store8_noabort+0x17/0x20 [ 22.403544] __internal_add_timer+0x275/0x2d0 [ 22.404012] ? calc_wheel_index+0x200/0x200 [ 22.404452] mod_timer+0x622/0x15b0 [ 22.404829] ? mod_timer_pending+0x14e0/0x14e0 [ 22.405306] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 22.405829] ? trace_hardirqs_on+0xd/0x10 [ 22.406266] ? _crng_backtrack_protect+0xd9/0x130 [ 22.406770] ? __lock_is_held+0xbc/0x140 [ 22.407203] ? __lockdep_init_map+0xe4/0x650 [ 22.407670] ? lockdep_init_map+0x3d/0x70 [ 22.408103] ? rcu_read_lock_sched_held+0x108/0x120 [ 22.408643] ? init_timer_key+0x126/0x3b0 [ 22.409063] ? try_to_del_timer_sync+0x120/0x120 [ 22.409566] ? round_jiffies_up+0xce/0x100 [ 22.410005] ? __round_jiffies_up_relative+0x150/0x150 [ 22.410557] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 22.411080] __tun_chr_ioctl+0x1b23/0x3d20 [ 22.411538] ? tun_chr_read_iter+0x1e0/0x1e0 [ 22.412000] ? lock_downgrade+0x990/0x990 [ 22.412421] ? check_same_owner+0x320/0x320 [ 22.412840] ? __handle_mm_fault+0x39c0/0x39c0 [ 22.413317] ? vmacache_find+0x61/0x270 [ 22.413722] ? tun_chr_compat_ioctl+0x30/0x30 [ 22.414173] tun_chr_ioctl+0x2a/0x40 [ 22.414559] ? tun_chr_ioctl+0x2a/0x40 [ 22.414961] do_vfs_ioctl+0x1b1/0x1530 [ 22.415365] ? ioctl_preallocate+0x2b0/0x2b0 [ 22.415820] ? selinux_capable+0x40/0x40 [ 22.416238] ? putname+0xf3/0x130 [ 22.416591] ? do_sys_open+0x320/0x6d0 [ 22.416989] ? security_file_ioctl+0x7d/0xb0 [ 22.417431] ? security_file_ioctl+0x89/0xb0 [ 22.417877] SyS_ioctl+0x8f/0xc0 [ 22.418224] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 22.418669] RIP: 0033:0x439019 [ 22.418988] RSP: 002b:00007ffd51cdbea8 EFLAGS: 00000207 ORIG_RAX: 0000000000000010 [ 22.419683] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439019 [ 22.420314] RDX: 0000000020822000 RSI: 00000000400454ca RDI: 0000000000000006 [ 22.420942] RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 [ 22.421574] R10: 00000000000000fd R11: 0000000000000207 R12: 5f6010a0d3dd9153 [ 22.422206] R13: 74656e2f7665642f R14: 0000000000401d00 R15: 0000000000000000 [ 22.422925] Dumping ftrace buffer: [ 22.423605] (ftrace buffer empty) [ 22.423979] Kernel Offset: disabled [ 22.424340] Rebooting in 86400 seconds..