jfs_lookup: dtSearch returned -5 find_entry called with index >= next_index ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:1998:37 index -128 is out of range for type 'struct dtslot[128]' CPU: 1 UID: 0 PID: 7742 Comm: syz.0.208 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 ubsan_epilogue+0x14/0x48 lib/ubsan.c:233 __ubsan_handle_out_of_bounds+0xd0/0xfc lib/ubsan.c:455 dtSplitRoot+0x87c/0x12f4 fs/jfs/jfs_dtree.c:1998 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline] dtInsert+0xba0/0x49c0 fs/jfs/jfs_dtree.c:871 jfs_create+0x588/0x8c4 fs/jfs/namei.c:137 lookup_open fs/namei.c:3796 [inline] open_last_lookups fs/namei.c:3895 [inline] path_openat+0x12d8/0x2c40 fs/namei.c:4131 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 ---[ end trace ]--- ================================================================== BUG: KASAN: slab-use-after-free in dtSplitRoot+0x898/0x12f4 fs/jfs/jfs_dtree.c:1999 Read of size 4 at addr ffff0000d2e9101c by task syz.0.208/7742 CPU: 1 UID: 0 PID: 7742 Comm: syz.0.208 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 dtSplitRoot+0x898/0x12f4 fs/jfs/jfs_dtree.c:1999 dtSplitUp fs/jfs/jfs_dtree.c:993 [inline] dtInsert+0xba0/0x49c0 fs/jfs/jfs_dtree.c:871 jfs_create+0x588/0x8c4 fs/jfs/namei.c:137 lookup_open fs/namei.c:3796 [inline] open_last_lookups fs/namei.c:3895 [inline] path_openat+0x12d8/0x2c40 fs/namei.c:4131 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Allocated by task 7273: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:573 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __do_kmalloc_node mm/slub.c:5627 [inline] __kmalloc_noprof+0x3fc/0x728 mm/slub.c:5639 kmalloc_noprof include/linux/slab.h:961 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] hash_netport4_resize+0x90c/0x17fc net/netfilter/ipset/ip_set_hash_gen.h:707 call_ad+0x3b0/0x948 net/netfilter/ipset/ip_set_core.c:1757 ip_set_ad+0x5b0/0x76c net/netfilter/ipset/ip_set_core.c:1841 ip_set_uadd+0x74/0x8c net/netfilter/ipset/ip_set_core.c:1864 nfnetlink_rcv_msg+0x9d4/0xed8 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x220/0x3fc net/netlink/af_netlink.c:2552 nfnetlink_rcv+0x1f0/0x1e20 net/netfilter/nfnetlink.c:669 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x694/0x8c4 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x648/0x930 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0x490/0x7b8 net/socket.c:2630 ___sys_sendmsg+0x204/0x278 net/socket.c:2684 __sys_sendmsg net/socket.c:2716 [inline] __do_sys_sendmsg net/socket.c:2721 [inline] __se_sys_sendmsg net/socket.c:2719 [inline] __arm64_sys_sendmsg+0x184/0x238 net/socket.c:2719 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Freed by task 5222: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 __kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2523 [inline] slab_free_freelist_hook mm/slub.c:2552 [inline] slab_free_bulk mm/slub.c:6643 [inline] kmem_cache_free_bulk+0x980/0xc28 mm/slub.c:7327 kfree_bulk include/linux/slab.h:830 [inline] kvfree_rcu_bulk+0xfc/0x228 mm/slab_common.c:1522 kfree_rcu_work+0xb8/0x140 mm/slab_common.c:1600 process_one_work+0x7e8/0x155c kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3427 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:56 kasan_record_aux_stack+0xb0/0xc8 mm/kasan/generic.c:559 kvfree_call_rcu+0x128/0x47c mm/slab_common.c:1995 hash_netport4_add+0x15fc/0x21c4 net/netfilter/ipset/ip_set_hash_gen.h:992 hash_netport4_uadt+0x98c/0xc74 net/netfilter/ipset/ip_set_hash_netport.c:255 call_ad+0x300/0x948 net/netfilter/ipset/ip_set_core.c:1751 ip_set_ad+0x5b0/0x76c net/netfilter/ipset/ip_set_core.c:1841 ip_set_uadd+0x74/0x8c net/netfilter/ipset/ip_set_core.c:1864 nfnetlink_rcv_msg+0x9d4/0xed8 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x220/0x3fc net/netlink/af_netlink.c:2552 nfnetlink_rcv+0x1f0/0x1e20 net/netfilter/nfnetlink.c:669 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x694/0x8c4 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x648/0x930 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0x490/0x7b8 net/socket.c:2630 ___sys_sendmsg+0x204/0x278 net/socket.c:2684 __sys_sendmsg net/socket.c:2716 [inline] __do_sys_sendmsg net/socket.c:2721 [inline] __se_sys_sendmsg net/socket.c:2719 [inline] __arm64_sys_sendmsg+0x184/0x238 net/socket.c:2719 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000d2e91000 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 28 bytes inside of freed 64-byte region [ffff0000d2e91000, ffff0000d2e91040) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000d2e91580 pfn:0x112e91 flags: 0x5ffc00000000200(workingset|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000200 ffff0000c00018c0 fffffdffc34dde10 fffffdffc3209a10 raw: ffff0000d2e91580 0000000000200015 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d2e90f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d2e90f80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff0000d2e91000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff0000d2e91080: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ffff0000d2e91100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== find_entry called with index = 0 ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ... ... Log Wrap ... Log Wrap ... Log Wrap ...