================================================================== BUG: KASAN: slab-out-of-bounds in ext4_htree_fill_tree+0x1316/0x13e0 fs/ext4/namei.c:1246 Read of size 1 at addr ffff8881317b1c67 by task syz-executor/365 CPU: 0 PID: 365 Comm: syz-executor Not tainted 6.1.129-syzkaller-00051-gc1fd50266bd6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348 ext4_htree_fill_tree+0x1316/0x13e0 fs/ext4/namei.c:1246 ext4_dx_readdir fs/ext4/dir.c:605 [inline] ext4_readdir+0x2e6f/0x3860 fs/ext4/dir.c:142 iterate_dir+0x265/0x600 fs/readdir.c:-1 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x1c1/0x460 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 x64_sys_call+0x5ae/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:218 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f0fb8bbfad3 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 72 3e f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8 RSP: 002b:00007fffd657b318 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555579ae04e0 RCX: 00007f0fb8bbfad3 RDX: 0000000000008000 RSI: 0000555579ae04e0 RDI: 0000000000000005 RBP: 0000555579ae04b4 R08: 0000000000028b61 R09: 0000000000000000 R10: 00007f0fb8d7cca0 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 0000555579ae04b0 R15: 00007fffd657d5d0 Allocated by task 6: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:333 kasan_slab_alloc include/linux/kasan.h:202 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768 slab_alloc_node mm/slub.c:3421 [inline] slab_alloc mm/slub.c:3431 [inline] __kmem_cache_alloc_lru mm/slub.c:3438 [inline] kmem_cache_alloc+0x175/0x320 mm/slub.c:3447 fib6_add_1 net/ipv6/ip6_fib.c:-1 [inline] fib6_add+0x939/0x3dd0 net/ipv6/ip6_fib.c:1400 __ip6_ins_rt net/ipv6/route.c:1308 [inline] ip6_ins_rt+0x102/0x170 net/ipv6/route.c:1318 __ipv6_ifa_notify+0x5ab/0x11a0 net/ipv6/addrconf.c:6226 ipv6_ifa_notify net/ipv6/addrconf.c:6265 [inline] addrconf_dad_completed+0x177/0xdb0 net/ipv6/addrconf.c:4282 addrconf_dad_work+0xd95/0x16b0 net/ipv6/addrconf.c:-1 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 kthread+0x26d/0x300 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff8881317b1c00 which belongs to the cache fib6_nodes of size 72 The buggy address is located 31 bytes to the right of 72-byte region [ffff8881317b1c00, ffff8881317b1c48) The buggy address belongs to the physical page: page:ffffea0004c5ec40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1317b1 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff88810e176780 raw: 0000000000000000 0000000080200020 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 6, tgid 6 (kworker/0:0), ts 26574820687, free_ts 24584131155 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2637 prep_new_page+0x1b/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x3a98/0x3b10 mm/page_alloc.c:4539 __alloc_pages+0x234/0x610 mm/page_alloc.c:5837 alloc_slab_page+0x6c/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1962 [inline] new_slab+0x90/0x3e0 mm/slub.c:2015 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3203 __slab_alloc+0x5d/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] slab_alloc mm/slub.c:3431 [inline] __kmem_cache_alloc_lru mm/slub.c:3438 [inline] kmem_cache_alloc+0x1be/0x320 mm/slub.c:3447 kmem_cache_zalloc include/linux/slab.h:689 [inline] node_alloc net/ipv6/ip6_fib.c:187 [inline] fib6_add_1 net/ipv6/ip6_fib.c:881 [inline] fib6_add+0x9bf/0x3dd0 net/ipv6/ip6_fib.c:1400 __ip6_ins_rt net/ipv6/route.c:1308 [inline] ip6_ins_rt+0x102/0x170 net/ipv6/route.c:1318 __ipv6_ifa_notify+0x5ab/0x11a0 net/ipv6/addrconf.c:6226 ipv6_ifa_notify net/ipv6/addrconf.c:6265 [inline] addrconf_dad_completed+0x177/0xdb0 net/ipv6/addrconf.c:4282 addrconf_dad_work+0xd95/0x16b0 net/ipv6/addrconf.c:-1 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x9f1/0xa00 mm/page_alloc.c:3581 free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3677 free_the_page mm/page_alloc.c:830 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5926 __vunmap+0x9c6/0xb80 mm/vmalloc.c:2729 __vfree mm/vmalloc.c:2778 [inline] vfree+0x5c/0x80 mm/vmalloc.c:2809 kcov_put kernel/kcov.c:437 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:533 __fput+0x1e5/0x870 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x24d/0x2e0 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0xbd0/0x2b80 kernel/exit.c:877 do_group_exit+0x21a/0x2d0 kernel/exit.c:1027 get_signal+0x169d/0x1820 kernel/signal.c:2889 arch_do_signal_or_restart+0xb0/0x16f0 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x74/0xa0 kernel/entry/common.c:174 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x26/0x130 kernel/entry/common.c:303 Memory state around the buggy address: ffff8881317b1b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881317b1b80: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc >ffff8881317b1c00: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ^ ffff8881317b1c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881317b1d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs (loop0): unmounting filesystem.