SS: sel=0x0000, attr=0x00093, limit=0x0000ffff, base=0x0000000000000000 INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 0 PID: 4831 Comm: syz-executor5 Not tainted 4.13.0-rc7-next-20170829+ #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 register_lock_class+0x55e/0x2c70 kernel/locking/lockdep.c:769 ================================================================== BUG: KASAN: use-after-free in __collect_expired_timers include/linux/list.h:729 [inline] BUG: KASAN: use-after-free in collect_expired_timers kernel/time/timer.c:1569 [inline] BUG: KASAN: use-after-free in __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616 Write of size 8 at addr ffff88003d81ba48 by task syz-executor7/4870 __lock_acquire+0x203/0x4620 kernel/locking/lockdep.c:3385 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4002 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:321 [inline] tun_flow_cleanup+0xf4/0x300 drivers/net/tun.c:383 call_timer_fn+0x246/0x850 kernel/time/timer.c:1281 expire_timers kernel/time/timer.c:1320 [inline] __run_timers+0x7fd/0xb90 kernel/time/timer.c:1620 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1646 __do_softirq+0x2bd/0xbd4 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:1044 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:577 RIP: 0010:arch_local_irq_enable arch/x86/include/asm/paravirt.h:824 [inline] RIP: 0010:vcpu_enter_guest arch/x86/kvm/x86.c:7029 [inline] RIP: 0010:vcpu_run arch/x86/kvm/x86.c:7111 [inline] RIP: 0010:kvm_arch_vcpu_ioctl_run+0x1bc4/0x5a30 arch/x86/kvm/x86.c:7272 RSP: 0018:ffff880039d67670 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: 0000000000010000 RBX: ffff88003dc28440 RCX: ffffc900040a5000 RDX: 0000000000010000 RSI: ffffffff810e211d RDI: ffffffff85ac97b8 RBP: ffff880039d67a40 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffdb98080d1e R13: dffffc0000000000 R14: ffff880069f185f0 R15: ffff880069f185c0 kvm_vcpu_ioctl+0x64c/0x1010 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2592 vfs_ioctl fs/ioctl.c:45 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:685 SYSC_ioctl fs/ioctl.c:700 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:691 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x446749 RSP: 002b:00007f8df3a7ec08 EFLAGS: 00000296 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000020 RCX: 0000000000446749 RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000020 RBP: 0000000000000086 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f8df3a7f9c0 R15: 00007f8df3a7f700 CPU: 1 PID: 4870 Comm: syz-executor7 Not tainted 4.13.0-rc7-next-20170829+ #11 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x24e/0x340 mm/kasan/report.c:409 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:435 __collect_expired_timers include/linux/list.h:729 [inline] collect_expired_timers kernel/time/timer.c:1569 [inline] __run_timers+0xa2e/0xb90 kernel/time/timer.c:1616 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1646 __do_softirq+0x2bd/0xbd4 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:1044 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:577 RIP: 0010:entry_SYSCALL_64_fastpath+0xd/0xbe RSP: 0018:ffff88003ab17f58 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: 00000000000000ca RBX: 00000000007080cc RCX: 0000000000446749 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000007080cc RBP: 000000000000975e R08: 0000001ddbc249c0 R09: 0000004b0000001f R10: 0000000000a5f970 R11: ffff88003ad20280 R12: 0000000000000014 R13: 00000000007080cc R14: 000000000000001d R15: 00000000007080a8 Allocated by task 4527: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x47/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.41+0x41/0xd0 net/core/skbuff.c:138 __alloc_skb+0x13b/0x740 net/core/skbuff.c:206 alloc_skb_fclone include/linux/skbuff.h:1017 [inline] tipc_buf_acquire+0x2d/0xf0 net/tipc/msg.c:66 tipc_msg_build+0xf4/0x11b0 net/tipc/msg.c:264 __tipc_sendstream+0x5f3/0xc00 net/tipc/socket.c:1080 tipc_sendstream+0x50/0x70 net/tipc/socket.c:1039 sock_sendmsg_nosec net/socket.c:633 [inline] sock_sendmsg+0xca/0x110 net/socket.c:643 ___sys_sendmsg+0x748/0x8c0 net/socket.c:2049 __sys_sendmsg+0xe5/0x210 net/socket.c:2083 SYSC_sendmsg net/socket.c:2094 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2090 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 4545: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3503 [inline] kfree+0xca/0x250 mm/slab.c:3820 skb_free_head+0x74/0xb0 net/core/skbuff.c:554 skb_release_data+0x58c/0x790 net/core/skbuff.c:574 skb_release_all+0x4a/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb+0x15d/0x4c0 net/core/skbuff.c:663 tipc_msg_reverse+0x89d/0xc00 net/tipc/msg.c:504 tipc_sk_respond+0x23b/0x550 net/tipc/socket.c:234 __tipc_shutdown+0x6d7/0xc80 net/tipc/socket.c:511 tipc_release+0x110/0xfd0 net/tipc/socket.c:560 sock_release+0x8d/0x1e0 net/socket.c:597 sock_close+0x16/0x20 net/socket.c:1126 __fput+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:246 task_work_run+0x199/0x270 kernel/task_work.c:112 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xa52/0x1b40 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x7e8/0x17e0 kernel/signal.c:2334 do_signal+0x94/0x1ee0 arch/x86/kernel/signal.c:808 exit_to_usermode_loop+0x224/0x300 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath+0x42f/0x500 arch/x86/entry/common.c:266 entry_SYSCALL_64_fastpath+0xbc/0xbe The buggy address belongs to the object at ffff88003d818640 which belongs to the cache kmalloc-16384 of size 16384 The buggy address is located 13320 bytes inside of 16384-byte region [ffff88003d818640, ffff88003d81c640) The buggy address belongs to the page: page:ffffea0000f60600 count:1 mapcount:0 mapping:ffff88003d818640 index:0x0 compound_mapcount: 0 flags: 0x100000000008100(slab|head) raw: 0100000000008100 ffff88003d818640 0000000000000000 0000000100000001 raw: ffffea0000db0620 ffffea0000f48820 ffff88003e802200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88003d81b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88003d81b980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88003d81ba00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88003d81ba80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88003d81bb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================