================================================================== BUG: KASAN: out-of-bounds in hlist_add_head include/linux/list.h:787 [inline] BUG: KASAN: out-of-bounds in enqueue_timer kernel/time/timer.c:541 [inline] BUG: KASAN: out-of-bounds in __internal_add_timer+0x2a6/0x4a0 kernel/time/timer.c:554 Write of size 8 at addr ffff8881e6f331c8 by task syz-executor.0/1795 CPU: 0 PID: 1795 Comm: syz-executor.0 Not tainted 5.4.125-syzkaller-00245-ga57aec00e1ca #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x24e lib/dump_stack.c:118 print_address_description+0x9b/0x650 mm/kasan/report.c:384 __kasan_report+0x182/0x260 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 hlist_add_head include/linux/list.h:787 [inline] enqueue_timer kernel/time/timer.c:541 [inline] __internal_add_timer+0x2a6/0x4a0 kernel/time/timer.c:554 internal_add_timer kernel/time/timer.c:604 [inline] __mod_timer+0xab9/0x1c70 kernel/time/timer.c:1065 tun_flow_init drivers/net/tun.c:1376 [inline] tun_set_iff drivers/net/tun.c:2848 [inline] __tun_chr_ioctl+0x3408/0x4d20 drivers/net/tun.c:3143 do_vfs_ioctl+0x76a/0x1720 fs/ioctl.c:47 ksys_ioctl fs/ioctl.c:742 [inline] __do_sys_ioctl fs/ioctl.c:749 [inline] __se_sys_ioctl fs/ioctl.c:747 [inline] __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007faf7d790188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 00000000200000c0 RSI: 00000000400454ca RDI: 0000000000000004 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd6230ee9f R14: 00007faf7d790300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea00079bccc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00079bcc88 ffffea0007985b48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x19a/0x380 mm/page_alloc.c:2171 get_page_from_freelist+0x550/0x8b0 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x3a2/0x880 mm/page_alloc.c:4855 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] __pte_alloc_one include/asm-generic/pgalloc.h:63 [inline] pte_alloc_one+0x1b/0xb0 arch/x86/mm/pgtable.c:26 __do_fault mm/memory.c:3190 [inline] do_shared_fault mm/memory.c:3651 [inline] do_fault mm/memory.c:3729 [inline] handle_pte_fault mm/memory.c:3956 [inline] __handle_mm_fault mm/memory.c:4080 [inline] handle_mm_fault+0x1f56/0x42f0 mm/memory.c:4117 do_user_addr_fault+0x4a0/0xb40 arch/x86/mm/fault.c:1469 page_fault+0x2f/0x40 arch/x86/entry/entry_64.S:1203 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare+0x1a9/0x270 mm/page_alloc.c:1233 free_unref_page_prepare mm/page_alloc.c:3085 [inline] free_unref_page_list+0x115/0x6c0 mm/page_alloc.c:3154 release_pages+0x98f/0x9d0 mm/swap.c:842 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:184 [inline] tlb_flush_mmu+0x77f/0x910 mm/mmu_gather.c:191 tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:272 exit_mmap+0x2e8/0x540 mm/mmap.c:3176 __mmput+0x34/0x240 kernel/fork.c:1089 exit_mm kernel/exit.c:489 [inline] do_exit+0xc19/0x2bf0 kernel/exit.c:799 do_group_exit+0x15c/0x2c0 kernel/exit.c:910 get_signal+0x164f/0x1fc0 kernel/signal.c:2745 do_signal+0x8d/0x610 arch/x86/kernel/signal.c:793 exit_to_usermode_loop arch/x86/entry/common.c:159 [inline] prepare_exit_to_usermode+0x207/0x310 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Memory state around the buggy address: ffff8881e6f33080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881e6f33100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881e6f33180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881e6f33200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881e6f33280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== device syzkaller1 entered promiscuous mode device syzkaller1 left promiscuous mode