================================================================== BUG: KASAN: slab-use-after-free in reverse_path_check_proc+0x5b/0x240 fs/eventpoll.c:1663 Read of size 8 at addr ffff8880296b5b40 by task syz.0.924/8848 CPU: 1 UID: 0 PID: 8848 Comm: syz.0.924 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 reverse_path_check_proc+0x5b/0x240 fs/eventpoll.c:1663 reverse_path_check fs/eventpoll.c:1692 [inline] ep_insert+0xc6c/0x1820 fs/eventpoll.c:1881 do_epoll_ctl_file+0x8bb/0xed0 fs/eventpoll.c:2651 do_epoll_ctl fs/eventpoll.c:2698 [inline] __do_sys_epoll_ctl fs/eventpoll.c:2715 [inline] __se_sys_epoll_ctl+0x14e/0x210 fs/eventpoll.c:2706 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fafbf1dce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fafbd3ec028 EFLAGS: 00000246 ORIG_RAX: 00000000000000e9 RAX: ffffffffffffffda RBX: 00007fafbf456180 RCX: 00007fafbf1dce59 RDX: 0000000000000004 RSI: 0000000000000001 RDI: 0000000000000007 RBP: 00007fafbf272d6f R08: 0000000000000000 R09: 0000000000000000 R10: 00002000000003c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fafbf456218 R14: 00007fafbf456180 R15: 00007ffc04e1be38 Allocated by task 8844: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4583 [inline] slab_alloc_node mm/slub.c:4912 [inline] kmem_cache_alloc_noprof+0x33b/0x680 mm/slub.c:4919 ep_attach_file fs/eventpoll.c:1751 [inline] ep_register_epitem fs/eventpoll.c:1833 [inline] ep_insert+0x512/0x1820 fs/eventpoll.c:1876 do_epoll_ctl_file+0x8bb/0xed0 fs/eventpoll.c:2651 do_epoll_ctl fs/eventpoll.c:2698 [inline] __do_sys_epoll_ctl fs/eventpoll.c:2715 [inline] __se_sys_epoll_ctl+0x14e/0x210 fs/eventpoll.c:2706 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 8844: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2700 [inline] slab_free mm/slub.c:6284 [inline] kmem_cache_free+0x187/0x6c0 mm/slub.c:6411 eventpoll_release_file+0xc2/0x240 fs/eventpoll.c:1386 eventpoll_release include/linux/eventpoll.h:61 [inline] __fput+0x83c/0xa70 fs/file_table.c:501 task_work_run+0x1d9/0x270 kernel/task_work.c:233 get_signal+0x11eb/0x1330 kernel/signal.c:2809 arch_do_signal_or_restart+0xbc/0x840 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x8c/0x4d0 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880296b5b40 which belongs to the cache ep_head of size 16 The buggy address is located 0 bytes inside of freed 16-byte region [ffff8880296b5b40, ffff8880296b5b50) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880296b53c0 pfn:0x296b5 memcg:ffff888033e35001 flags: 0x80000000000200(workingset|node=0|zone=1) page_type: f5(slab) raw: 0080000000000200 ffff888140ae3000 ffffea0000d23a10 ffff8880202aff88 raw: ffff8880296b53c0 0000000800800076 00000000f5000000 ffff888033e35001 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4982, tgid 4982 (udevd), ts 37436923806, free_ts 37303966759 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1868 prep_new_page mm/page_alloc.c:1876 [inline] get_page_from_freelist+0x28c1/0x2940 mm/page_alloc.c:3949 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5292 alloc_slab_page mm/slub.c:3289 [inline] allocate_slab+0x74/0x5e0 mm/slub.c:3404 new_slab mm/slub.c:3447 [inline] refill_objects+0x33c/0x3d0 mm/slub.c:7226 refill_sheaf mm/slub.c:2827 [inline] __pcs_replace_empty_main+0x373/0x720 mm/slub.c:4665 alloc_from_pcs mm/slub.c:4763 [inline] slab_alloc_node mm/slub.c:4897 [inline] kmem_cache_alloc_noprof+0x433/0x680 mm/slub.c:4919 ep_attach_file fs/eventpoll.c:1751 [inline] ep_register_epitem fs/eventpoll.c:1833 [inline] ep_insert+0x512/0x1820 fs/eventpoll.c:1876 do_epoll_ctl_file+0x8bb/0xed0 fs/eventpoll.c:2651 do_epoll_ctl fs/eventpoll.c:2698 [inline] __do_sys_epoll_ctl fs/eventpoll.c:2715 [inline] __se_sys_epoll_ctl+0x14e/0x210 fs/eventpoll.c:2706 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5154 tgid 5154 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1415 [inline] __free_frozen_pages+0x10af/0x1190 mm/page_alloc.c:2953 __slab_free+0x252/0x2a0 mm/slub.c:5646 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4583 [inline] slab_alloc_node mm/slub.c:4912 [inline] kmem_cache_alloc_noprof+0x33b/0x680 mm/slub.c:4919 ptlock_alloc+0x20/0x70 mm/memory.c:7582 ptlock_init include/linux/mm.h:3731 [inline] pagetable_pte_ctor include/linux/mm.h:3780 [inline] __pte_alloc_one_noprof include/asm-generic/pgalloc.h:79 [inline] pte_alloc_one+0x7e/0x380 arch/x86/mm/pgtable.c:18 __pte_alloc+0x25/0x1a0 mm/memory.c:453 move_page_tables+0x16a2/0x1b90 mm/mremap.c:870 relocate_vma_down+0x3ab/0x590 mm/vma_exec.c:67 setup_arg_pages+0x70a/0xbd0 fs/exec.c:690 load_elf_binary+0xc67/0x29b0 fs/binfmt_elf.c:1028 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x94a/0x1510 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 Memory state around the buggy address: ffff8880296b5a00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff8880296b5a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc >ffff8880296b5b00: 00 00 fc fc fa fb fc fc fa fb fc fc 00 00 fc fc ^ ffff8880296b5b80: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc ffff8880296b5c00: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc ==================================================================