================================================================== BUG: KASAN: out-of-bounds in hlist_add_head include/linux/list.h:814 [inline] BUG: KASAN: out-of-bounds in enqueue_timer+0xb7/0x300 kernel/time/timer.c:541 Write of size 8 at addr ffff8881d7d071c8 by task syz-executor.2/502 CPU: 1 PID: 502 Comm: syz-executor.2 Not tainted 5.4.276-syzkaller-04917-g58de09405d1e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 hlist_add_head include/linux/list.h:814 [inline] enqueue_timer+0xb7/0x300 kernel/time/timer.c:541 __internal_add_timer kernel/time/timer.c:554 [inline] internal_add_timer+0x240/0x430 kernel/time/timer.c:604 __mod_timer+0x6f1/0x13e0 kernel/time/timer.c:1065 tun_flow_init drivers/net/tun.c:1446 [inline] tun_net_init+0x287/0x540 drivers/net/tun.c:1055 register_netdevice+0x1c0/0x12a0 net/core/dev.c:9120 tun_set_iff+0x7f7/0xdc0 drivers/net/tun.c:2919 __tun_chr_ioctl+0x8a9/0x1d00 drivers/net/tun.c:3184 do_vfs_ioctl+0x742/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+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x454b09 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 b4 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7ed57cd0f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 0000000000454b09 RDX: 0000000020000300 RSI: 00000000400454ca RDI: 0000000000000003 RBP: 00000000000005b8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004e4b40 R13: 00007f7ed57cd674 R14: 000000000054bf00 R15: 00000000004fb940 The buggy address belongs to the page: page:ffffea00075f41c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8881ebb7ab00 flags: 0x8000000000000000() raw: 8000000000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff8881ebb7ab00 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2cc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893 __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] pcpu_alloc_pages mm/percpu-vm.c:94 [inline] pcpu_populate_chunk+0x1bb/0xd00 mm/percpu-vm.c:284 pcpu_alloc+0x79e/0x1050 mm/percpu.c:1714 bpf_array_alloc_percpu kernel/bpf/arraymap.c:35 [inline] array_map_alloc+0x38c/0x6d0 kernel/bpf/arraymap.c:133 find_and_alloc_map kernel/bpf/syscall.c:122 [inline] map_create kernel/bpf/syscall.c:573 [inline] __do_sys_bpf kernel/bpf/syscall.c:2873 [inline] __se_sys_bpf+0x3291/0xbcb0 kernel/bpf/syscall.c:2849 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 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 mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x297/0x380 mm/page_alloc.c:3085 free_unref_page mm/page_alloc.c:3134 [inline] free_the_page mm/page_alloc.c:4953 [inline] __free_pages+0xaf/0x140 mm/page_alloc.c:4961 pcpu_free_pages mm/percpu-vm.c:64 [inline] pcpu_depopulate_chunk mm/percpu-vm.c:328 [inline] pcpu_balance_workfn+0x940/0x1450 mm/percpu.c:1865 process_one_work+0x765/0xd20 kernel/workqueue.c:2290 worker_thread+0xaef/0x1470 kernel/workqueue.c:2436 kthread+0x2da/0x360 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 Memory state around the buggy address: ffff8881d7d07080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d7d07100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881d7d07180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8881d7d07200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d7d07280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================