================================================================== BUG: KASAN: use-after-free in hlist_move_list include/linux/list.h:870 [inline] BUG: KASAN: use-after-free in __collect_expired_timers kernel/time/timer.c:1484 [inline] BUG: KASAN: use-after-free in collect_expired_timers kernel/time/timer.c:1719 [inline] BUG: KASAN: use-after-free in __run_timers+0x521/0xbe0 kernel/time/timer.c:1783 Write of size 8 at addr ffff8881aa5131c8 by task ksoftirqd/1/17 CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 5.4.259-syzkaller-00008-g4497cd332cf9 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 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_move_list include/linux/list.h:870 [inline] __collect_expired_timers kernel/time/timer.c:1484 [inline] collect_expired_timers kernel/time/timer.c:1719 [inline] __run_timers+0x521/0xbe0 kernel/time/timer.c:1783 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1800 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:603 smpboot_thread_fn+0x545/0x930 kernel/smpboot.c:165 kthread+0x2da/0x360 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 The buggy address belongs to the page: page:ffffea0006a944c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 dead000000000122 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 2, migratetype Unmovable, gfp_mask 0x146dc0(GFP_USER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__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:4891 __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] kmalloc_order mm/slab_common.c:1342 [inline] kmalloc_order_trace+0x2a/0x100 mm/slab_common.c:1358 __kmalloc_node include/linux/slab.h:422 [inline] kmalloc_node include/linux/slab.h:599 [inline] kvmalloc_node+0x7e/0xf0 mm/util.c:596 kvmalloc include/linux/mm.h:761 [inline] kvzalloc include/linux/mm.h:769 [inline] alloc_netdev_mqs+0x85/0xc70 net/core/dev.c:9602 tun_set_iff+0x51f/0xdc0 drivers/net/tun.c:2887 __tun_chr_ioctl+0x8a9/0x1d00 drivers/net/tun.c:3181 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 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_pages_ok+0x847/0x950 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4953 [inline] __free_pages+0x91/0x140 mm/page_alloc.c:4959 device_release+0x6b/0x190 drivers/base/core.c:1776 kobject_cleanup lib/kobject.c:708 [inline] kobject_release lib/kobject.c:739 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1e6/0x2f0 lib/kobject.c:756 tun_set_iff+0x870/0xdc0 drivers/net/tun.c:2918 __tun_chr_ioctl+0x8a9/0x1d00 drivers/net/tun.c:3181 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 Memory state around the buggy address: ffff8881aa513080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881aa513100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881aa513180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881aa513200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881aa513280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================