executing program executing program syzkaller login: [ 38.081427] ================================================================== [ 38.082487] BUG: KASAN: use-after-free in __internal_add_timer+0x275/0x2d0 [ 38.083312] Write of size 8 at addr ffff8800391c3788 by task syzkaller260327/2976 [ 38.084182] [ 38.084364] CPU: 1 PID: 2976 Comm: syzkaller260327 Not tainted 4.13.0-next-20170907+ #17 [ 38.085557] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 38.086618] Call Trace: [ 38.086968] dump_stack+0x194/0x257 [ 38.087357] ? arch_local_irq_restore+0x53/0x53 [ 38.088003] ? show_regs_print_info+0x65/0x65 [ 38.088808] ? __kernel_text_address+0xae/0xe0 [ 38.089634] ? __internal_add_timer+0x275/0x2d0 [ 38.090628] print_address_description+0x73/0x250 [ 38.091498] ? __internal_add_timer+0x275/0x2d0 [ 38.092349] kasan_report+0x24e/0x340 [ 38.093068] __asan_report_store8_noabort+0x17/0x20 [ 38.094513] __internal_add_timer+0x275/0x2d0 [ 38.095216] ? calc_wheel_index+0x200/0x200 [ 38.095728] mod_timer+0x622/0x15b0 [ 38.096279] ? mod_timer_pending+0x14e0/0x14e0 [ 38.097225] ? __lock_is_held+0xbc/0x140 [ 38.097820] ? __lock_is_held+0xbc/0x140 [ 38.098422] ? __lockdep_init_map+0xe4/0x650 [ 38.098825] ? lockdep_init_map+0x3d/0x70 [ 38.099291] ? rcu_read_lock_sched_held+0x108/0x120 [ 38.100172] ? init_timer_key+0x126/0x3b0 [ 38.100854] ? try_to_del_timer_sync+0x120/0x120 [ 38.101614] ? round_jiffies_up+0xce/0x100 [ 38.102356] ? __round_jiffies_up_relative+0x150/0x150 [ 38.103267] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 38.104114] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 38.104857] __tun_chr_ioctl+0x1b23/0x3d20 [ 38.105374] ? tun_chr_read_iter+0x1e0/0x1e0 [ 38.105857] ? lock_downgrade+0x990/0x990 [ 38.106306] ? check_same_owner+0x320/0x320 [ 38.106770] ? __handle_mm_fault+0x39c0/0x39c0 [ 38.107253] ? vmacache_find+0x61/0x270 [ 38.107687] ? tun_chr_compat_ioctl+0x30/0x30 [ 38.108154] tun_chr_ioctl+0x2a/0x40 [ 38.108568] ? tun_chr_ioctl+0x2a/0x40 [ 38.108990] do_vfs_ioctl+0x1b1/0x1530 [ 38.109433] ? ioctl_preallocate+0x2b0/0x2b0 [ 38.109900] ? selinux_capable+0x40/0x40 [ 38.110335] ? putname+0xf3/0x130 [ 38.110783] ? do_sys_open+0x320/0x6d0 [ 38.111274] ? security_file_ioctl+0x7d/0xb0 [ 38.111740] ? security_file_ioctl+0x89/0xb0 [ 38.112201] SyS_ioctl+0x8f/0xc0 [ 38.112577] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 38.113107] RIP: 0033:0x439019 [ 38.113430] RSP: 002b:00007ffdbcf304a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 38.114344] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439019 [ 38.115185] RDX: 00000000206f8000 RSI: 00000000400454ca RDI: 0000000000000004 [ 38.116706] RBP: 0000000000000082 R08: 00000000000000fd R09: 0000000000000000 [ 38.117982] R10: 0000000000000000 R11: 0000000000000206 R12: 309d815b0389dc7e [ 38.119299] R13: 74656e2f7665642f R14: 0000000000401d00 R15: 0000000000000000 [ 38.120665] [ 38.120956] Allocated by task 2976: [ 38.121628] save_stack_trace+0x16/0x20 [ 38.122361] save_stack+0x43/0xd0 [ 38.122973] kasan_kmalloc+0xad/0xe0 [ 38.123656] __kmalloc_node+0x47/0x70 [ 38.124325] kvmalloc_node+0x64/0xd0 [ 38.125007] alloc_netdev_mqs+0x16e/0xed0 [ 38.125770] __tun_chr_ioctl+0x12be/0x3d20 [ 38.126543] tun_chr_ioctl+0x2a/0x40 [ 38.127107] do_vfs_ioctl+0x1b1/0x1530 [ 38.127829] SyS_ioctl+0x8f/0xc0 [ 38.128375] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 38.129093] [ 38.129343] Freed by task 2976: [ 38.129829] save_stack_trace+0x16/0x20 [ 38.130523] save_stack+0x43/0xd0 [ 38.131055] kasan_slab_free+0x71/0xc0 [ 38.131721] kfree+0xca/0x250 [ 38.132271] kvfree+0x36/0x60 [ 38.132839] free_netdev+0x2cf/0x360 [ 38.133512] __tun_chr_ioctl+0x2cf6/0x3d20 [ 38.134291] tun_chr_ioctl+0x2a/0x40 [ 38.135032] do_vfs_ioctl+0x1b1/0x1530 [ 38.135758] SyS_ioctl+0x8f/0xc0 [ 38.136357] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 38.137940] [ 38.138261] The buggy address belongs to the object at ffff8800391c0380 [ 38.138261] which belongs to the cache kmalloc-16384 of size 16384 [ 38.140078] The buggy address is located 13320 bytes inside of [ 38.140078] 16384-byte region [ffff8800391c0380, ffff8800391c4380) [ 38.141442] The buggy address belongs to the page: [ 38.142316] page:ffffea0000e47000 count:1 mapcount:0 mapping:ffff8800391c0380 index:0x0 compound_mapcount: 0 [ 38.143643] flags: 0x100000000008100(slab|head) [ 38.144049] raw: 0100000000008100 ffff8800391c0380 0000000000000000 0000000100000001 [ 38.144863] raw: ffffea0000e42620 ffffea0000e7a620 ffff88003e802200 0000000000000000 [ 38.146165] page dumped because: kasan: bad access detected [ 38.146992] [ 38.147229] Memory state around the buggy address: [ 38.147988] ffff8800391c3680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.149087] ffff8800391c3700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.150195] >ffff8800391c3780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.151499] ^ [ 38.152272] ffff8800391c3800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.153705] ffff8800391c3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.154960] ================================================================== [ 38.155785] Disabling lock debugging due to kernel taint [ 38.156452] Kernel panic - not syncing: panic_on_warn set ... [ 38.156452] [ 38.157115] CPU: 1 PID: 2976 Comm: syzkaller260327 Tainted: G B 4.13.0-next-20170907+ #17 [ 38.159464] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 38.160711] Call Trace: [ 38.160988] dump_stack+0x194/0x257 [ 38.161372] ? arch_local_irq_restore+0x53/0x53 [ 38.161853] ? vprintk_default+0x28/0x30 [ 38.162271] ? __internal_add_timer+0x1e0/0x2d0 [ 38.162755] panic+0x1e4/0x417 [ 38.163087] ? __warn+0x1d9/0x1d9 [ 38.163455] ? __internal_add_timer+0x275/0x2d0 [ 38.163940] kasan_end_report+0x50/0x50 [ 38.164557] kasan_report+0x137/0x340 [ 38.165021] __asan_report_store8_noabort+0x17/0x20 [ 38.165653] __internal_add_timer+0x275/0x2d0 [ 38.166169] ? calc_wheel_index+0x200/0x200 [ 38.166637] mod_timer+0x622/0x15b0 [ 38.167072] ? mod_timer_pending+0x14e0/0x14e0 [ 38.172690] ? __lock_is_held+0xbc/0x140 [ 38.173112] ? __lock_is_held+0xbc/0x140 [ 38.173846] ? __lockdep_init_map+0xe4/0x650 [ 38.174359] ? lockdep_init_map+0x3d/0x70 [ 38.174787] ? rcu_read_lock_sched_held+0x108/0x120 [ 38.175332] ? init_timer_key+0x126/0x3b0 [ 38.175756] ? try_to_del_timer_sync+0x120/0x120 [ 38.176245] ? round_jiffies_up+0xce/0x100 [ 38.176718] ? __round_jiffies_up_relative+0x150/0x150 [ 38.177242] ? debug_lockdep_rcu_enabled+0x77/0x90 [ 38.177733] ? selinux_tun_dev_alloc_security+0x124/0x170 [ 38.178258] __tun_chr_ioctl+0x1b23/0x3d20 [ 38.178692] ? tun_chr_read_iter+0x1e0/0x1e0 [ 38.179491] ? lock_downgrade+0x990/0x990 [ 38.179932] ? check_same_owner+0x320/0x320 [ 38.180435] ? __handle_mm_fault+0x39c0/0x39c0 [ 38.180898] ? vmacache_find+0x61/0x270 [ 38.181383] ? tun_chr_compat_ioctl+0x30/0x30 [ 38.181837] tun_chr_ioctl+0x2a/0x40 [ 38.182267] ? tun_chr_ioctl+0x2a/0x40 [ 38.182700] do_vfs_ioctl+0x1b1/0x1530 [ 38.183159] ? ioctl_preallocate+0x2b0/0x2b0 [ 38.183638] ? selinux_capable+0x40/0x40 [ 38.184096] ? putname+0xf3/0x130 [ 38.184484] ? do_sys_open+0x320/0x6d0 [ 38.184886] ? security_file_ioctl+0x7d/0xb0 [ 38.185389] ? security_file_ioctl+0x89/0xb0 [ 38.185857] SyS_ioctl+0x8f/0xc0 [ 38.186252] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 38.186746] RIP: 0033:0x439019 [ 38.187111] RSP: 002b:00007ffdbcf304a8 EFLAGS: 00000206 ORIG_RAX: 0000000000000010 [ 38.187899] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000439019 [ 38.188715] RDX: 00000000206f8000 RSI: 00000000400454ca RDI: 0000000000000004 [ 38.189493] RBP: 0000000000000082 R08: 00000000000000fd R09: 0000000000000000 [ 38.190270] R10: 0000000000000000 R11: 0000000000000206 R12: 309d815b0389dc7e [ 38.190961] R13: 74656e2f7665642f R14: 0000000000401d00 R15: 0000000000000000 [ 38.191807] Dumping ftrace buffer: [ 38.192197] (ftrace buffer empty) [ 38.192600] Kernel Offset: disabled [ 38.192977] Rebooting in 86400 seconds..