================================================================== BUG: KASAN: use-after-free in hlist_add_head include/linux/list.h:814 [inline] BUG: KASAN: use-after-free in enqueue_timer+0xb7/0x300 kernel/time/timer.c:541 Write of size 8 at addr ffff8881dd5931c8 by task syz-executor.3/2999 CPU: 0 PID: 2999 Comm: syz-executor.3 Not tainted 5.4.274-syzkaller-00002-g6f97bd951d82 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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 call_timer_fn+0x36/0x390 kernel/time/timer.c:1448 expire_timers kernel/time/timer.c:1493 [inline] __run_timers+0x879/0xbe0 kernel/time/timer.c:1817 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1086 do_softirq+0x121/0x160 kernel/softirq.c:337 __local_bh_enable_ip+0x6a/0x70 kernel/softirq.c:189 rcu_read_unlock_bh include/linux/rcupdate.h:739 [inline] ipv6_ifa_notify net/ipv6/addrconf.c:6120 [inline] add_addr+0x2cd/0x470 net/ipv6/addrconf.c:3143 sit_add_v4_addrs net/ipv6/addrconf.c:3199 [inline] addrconf_sit_config+0x8b7/0x1410 net/ipv6/addrconf.c:3450 addrconf_notify+0x9a5/0xe50 net/ipv6/addrconf.c:3645 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406 __dev_notify_flags+0x26e/0x510 net/core/dev.c:1670 dev_change_flags+0xe7/0x190 net/core/dev.c:8015 dev_ifsioc+0x104/0xa60 net/core/dev_ioctl.c:226 dev_ioctl+0x505/0xb40 net/core/dev_ioctl.c:483 sock_do_ioctl+0x295/0x3a0 net/socket.c:1081 sock_ioctl+0x4a4/0x760 net/socket.c:1198 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:0x7ff66195a0a9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff660cd40c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff661a90f80 RCX: 00007ff66195a0a9 RDX: 0000000020000040 RSI: 0000000000008914 RDI: 000000000000000a RBP: 00007ff6619c9074 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff661a90f80 R15: 00007ffed43f15f8 The buggy address belongs to the page: page:ffffea00077564c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00075a6708 ffffea0007756488 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO) 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 __vmalloc_area_node mm/vmalloc.c:2431 [inline] __vmalloc_node_range+0x384/0x710 mm/vmalloc.c:2499 vmalloc_user+0x70/0x80 mm/vmalloc.c:2629 kcov_mmap+0x28/0x120 kernel/kcov.c:450 call_mmap include/linux/fs.h:1994 [inline] mmap_region+0x110d/0x16f0 mm/mmap.c:1812 do_mmap+0x822/0xd30 mm/mmap.c:1581 do_mmap_pgoff include/linux/mm.h:2480 [inline] vm_mmap_pgoff+0x1b5/0x260 mm/util.c:528 ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1631 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 __vunmap+0x75b/0x890 mm/vmalloc.c:2260 kcov_mmap+0x8c/0x120 kernel/kcov.c:474 call_mmap include/linux/fs.h:1994 [inline] mmap_region+0x110d/0x16f0 mm/mmap.c:1812 do_mmap+0x822/0xd30 mm/mmap.c:1581 do_mmap_pgoff include/linux/mm.h:2480 [inline] vm_mmap_pgoff+0x1b5/0x260 mm/util.c:528 ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1631 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881dd593080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881dd593100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881dd593180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881dd593200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881dd593280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================