executing program executing program syzkaller login: [ 27.883849] ================================================================== [ 27.884463] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 27.884959] Write of size 8 at addr ffff88006a893788 by task syzkaller564517/2964 [ 27.885523] [ 27.885669] CPU: 2 PID: 2964 Comm: syzkaller564517 Not tainted 4.13.0-next-20170907+ #17 [ 27.886321] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 27.886927] Call Trace: [ 27.887403] dump_stack+0x194/0x257 [ 27.887682] ? arch_local_irq_restore+0x53/0x53 [ 27.888010] ? show_regs_print_info+0x65/0x65 [ 27.888357] ? __kernel_text_address+0xae/0xe0 [ 27.888764] ? __internal_add_timer+0x275/0x2d0 [ 27.889122] print_address_description+0x73/0x250 [ 27.889467] ? __internal_add_timer+0x275/0x2d0 [ 27.889811] kasan_report+0x24e/0x340 [ 27.890102] __asan_report_store8_noabort+0x17/0x20 [ 27.890455] __internal_add_timer+0x275/0x2d0 [ 27.890776] ? calc_wheel_index+0x200/0x200 [ 27.891106] mod_timer+0x622/0x15b0 [ 27.891373] ? mod_timer_pending+0x14e0/0x14e0 [ 27.891728] ? __lock_is_held+0xbc/0x140 [ 27.892031] ? __lock_is_held+0xbc/0x140 [ 27.892350] ? __lockdep_init_map+0xe4/0x650 [ 27.892701] ? lockdep_init_map+0x3d/0x70 [ 27.893076] ? rcu_read_lock_sched_held+0x108/0x120 [ 27.893601] ? init_timer_key+0x126/0x3b0 [ 27.893998] ? try_to_del_timer_sync+0x120/0x120 [ 27.894461] ? round_jiffies_up+0xce/0x100 [ 27.894796] ? __round_jiffies_up_relative+0x150/0x150 [ 27.895183] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 27.895529] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 27.895920] __tun_chr_ioctl+0x1b23/0x3d20 [ 27.896226] ? tun_chr_read_iter+0x1e0/0x1e0 [ 27.896540] ? lock_downgrade+0x990/0x990 [ 27.896864] ? check_same_owner+0x320/0x320 [ 27.897192] ? __handle_mm_fault+0x39c0/0x39c0 [ 27.897525] ? vmacache_find+0x61/0x270 [ 27.897838] ? tun_chr_compat_ioctl+0x30/0x30 [ 27.898155] tun_chr_ioctl+0x2a/0x40 [ 27.898415] ? tun_chr_ioctl+0x2a/0x40 [ 27.898690] do_vfs_ioctl+0x1b1/0x1530 [ 27.898971] ? ioctl_preallocate+0x2b0/0x2b0 [ 27.899281] ? selinux_capable+0x40/0x40 [ 27.899580] ? putname+0xf3/0x130 [ 27.899835] ? do_sys_open+0x320/0x6d0 [ 27.900155] ? security_file_ioctl+0x7d/0xb0 [ 27.900479] ? security_file_ioctl+0x89/0xb0 [ 27.900820] SyS_ioctl+0x8f/0xc0 [ 27.901068] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 27.901405] RIP: 0033:0x439069 [ 27.901637] RSP: 002b:00007ffcabaeced8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 27.902173] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439069 [ 27.902681] RDX: 00000000206d8fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 27.903244] RBP: 0000000000000082 R08: 00000000000000fd R09: 0000000000000000 [ 27.903781] R10: 0000000000000000 R11: 0000000000000206 R12: 7cd551d3f85e9feb [ 27.904281] R13: 74656e2f7665642f R14: 0000000000401d50 R15: 0000000000000000 [ 27.904797] [ 27.904918] Allocated by task 2964: [ 27.905181] save_stack_trace+0x16/0x20 [ 27.905463] save_stack+0x43/0xd0 [ 27.905714] kasan_kmalloc+0xad/0xe0 [ 27.905977] __kmalloc_node+0x47/0x70 [ 27.906299] kvmalloc_node+0x64/0xd0 [ 27.906659] alloc_netdev_mqs+0x16e/0xed0 [ 27.906993] __tun_chr_ioctl+0x12be/0x3d20 [ 27.907319] tun_chr_ioctl+0x2a/0x40 [ 27.907584] do_vfs_ioctl+0x1b1/0x1530 [ 27.907860] SyS_ioctl+0x8f/0xc0 [ 27.908103] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 27.908461] [ 27.908602] Freed by task 2964: [ 27.908869] save_stack_trace+0x16/0x20 [ 27.909391] save_stack+0x43/0xd0 [ 27.909666] kasan_slab_free+0x71/0xc0 [ 27.909951] kfree+0xca/0x250 [ 27.910224] kvfree+0x36/0x60 [ 27.910444] free_netdev+0x2cf/0x360 [ 27.910691] __tun_chr_ioctl+0x2cf6/0x3d20 [ 27.910980] tun_chr_ioctl+0x2a/0x40 [ 27.911238] do_vfs_ioctl+0x1b1/0x1530 [ 27.911510] SyS_ioctl+0x8f/0xc0 [ 27.911727] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 27.912040] [ 27.912154] The buggy address belongs to the object at ffff88006a890380 [ 27.912154] which belongs to the cache kmalloc-16384 of size 16384 [ 27.912988] The buggy address is located 13320 bytes inside of [ 27.912988] 16384-byte region [ffff88006a890380, ffff88006a894380) [ 27.913785] The buggy address belongs to the page: [ 27.914130] page:ffffea0001aa2400 count:1 mapcount:0 mapping:ffff88006a890380 index:0x0 compound_mapcount: 0 [ 27.914823] flags: 0x500000000008100(slab|head) [ 27.915161] raw: 0500000000008100 ffff88006a890380 0000000000000000 0000000100000001 [ 27.915680] raw: ffffea0001b3ce20 ffffea0001b29020 ffff88003e802200 0000000000000000 [ 27.916219] page dumped because: kasan: bad access detected [ 27.916588] [ 27.916699] Memory state around the buggy address: [ 27.917038] ffff88006a893680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.917550] ffff88006a893700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.918078] >ffff88006a893780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.918587] ^ [ 27.918841] ffff88006a893800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.919376] ffff88006a893880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 27.919934] ================================================================== [ 27.920471] Disabling lock debugging due to kernel taint [ 27.920885] Kernel panic - not syncing: panic_on_warn set ... [ 27.920885] [ 27.921697] CPU: 2 PID: 2964 Comm: syzkaller564517 Tainted: G B 4.13.0-next-20170907+ #17 [ 27.922391] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 27.922956] Call Trace: [ 27.923140] dump_stack+0x194/0x257 [ 27.923395] ? arch_local_irq_restore+0x53/0x53 [ 27.923718] ? vprintk_default+0x28/0x30 [ 27.924000] ? __internal_add_timer+0x1e0/0x2d0 [ 27.924326] panic+0x1e4/0x417 [ 27.924550] ? __warn+0x1d9/0x1d9 [ 27.924837] ? __internal_add_timer+0x275/0x2d0 [ 27.925230] kasan_end_report+0x50/0x50 [ 27.925612] kasan_report+0x137/0x340 [ 27.925883] __asan_report_store8_noabort+0x17/0x20 [ 27.926275] __internal_add_timer+0x275/0x2d0 [ 27.926592] ? calc_wheel_index+0x200/0x200 [ 27.926890] mod_timer+0x622/0x15b0 [ 27.927187] ? mod_timer_pending+0x14e0/0x14e0 [ 27.927503] ? __lock_is_held+0xbc/0x140 [ 27.927813] ? __lock_is_held+0xbc/0x140 [ 27.928103] ? __lockdep_init_map+0xe4/0x650 [ 27.928438] ? lockdep_init_map+0x3d/0x70 [ 27.928760] ? rcu_read_lock_sched_held+0x108/0x120 [ 27.929142] ? init_timer_key+0x126/0x3b0 [ 27.929454] ? try_to_del_timer_sync+0x120/0x120 [ 27.929780] ? round_jiffies_up+0xce/0x100 [ 27.930494] ? __round_jiffies_up_relative+0x150/0x150 [ 27.930929] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 27.931313] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 27.931697] __tun_chr_ioctl+0x1b23/0x3d20 [ 27.931995] ? tun_chr_read_iter+0x1e0/0x1e0 [ 27.932306] ? lock_downgrade+0x990/0x990 [ 27.932613] ? check_same_owner+0x320/0x320 [ 27.932921] ? __handle_mm_fault+0x39c0/0x39c0 [ 27.933277] ? vmacache_find+0x61/0x270 [ 27.933624] ? tun_chr_compat_ioctl+0x30/0x30 [ 27.933937] tun_chr_ioctl+0x2a/0x40 [ 27.934210] ? tun_chr_ioctl+0x2a/0x40 [ 27.934524] do_vfs_ioctl+0x1b1/0x1530 [ 27.934798] ? ioctl_preallocate+0x2b0/0x2b0 [ 27.935107] ? selinux_capable+0x40/0x40 [ 27.935390] ? putname+0xf3/0x130 [ 27.935630] ? do_sys_open+0x320/0x6d0 [ 27.935903] ? security_file_ioctl+0x7d/0xb0 [ 27.936223] ? security_file_ioctl+0x89/0xb0 [ 27.936586] SyS_ioctl+0x8f/0xc0 [ 27.936817] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 27.937153] RIP: 0033:0x439069 [ 27.937429] RSP: 002b:00007ffcabaeced8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 27.937977] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439069 [ 27.938583] RDX: 00000000206d8fd8 RSI: 00000000400454ca RDI: 0000000000000004 [ 27.939111] RBP: 0000000000000082 R08: 00000000000000fd R09: 0000000000000000 [ 27.939663] R10: 0000000000000000 R11: 0000000000000206 R12: 7cd551d3f85e9feb [ 27.940187] R13: 74656e2f7665642f R14: 0000000000401d50 R15: 0000000000000000 [ 27.940794] Dumping ftrace buffer: [ 27.941094] (ftrace buffer empty) [ 27.941379] Kernel Offset: disabled [ 27.941635] Rebooting in 86400 seconds..