================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2892:30 index -1 is out of range for type 'struct dtslot[128]' CPU: 1 PID: 4252 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282 jfs_readdir+0x1580/0x37bc fs/jfs/jfs_dtree.c:2892 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:2647:28 index -1 is out of range for type 'struct dtslot[128]' CPU: 1 PID: 4252 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282 add_missing_indices fs/jfs/jfs_dtree.c:2647 [inline] jfs_readdir+0x1dfc/0x37bc fs/jfs/jfs_dtree.c:3009 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:750:12 index 255 is out of range for type 'struct dtslot[128]' CPU: 1 PID: 4252 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282 diWrite+0xbcc/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5574 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 ================================================================================ ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:750:35 index 255 is out of range for type 'struct dtslot[128]' CPU: 1 PID: 4252 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282 diWrite+0xc24/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5574 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 ================================================================================ ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:750 Write of size 32 at addr ffff0000cb0df4c0 by task syz-executor.4/4252 CPU: 1 PID: 4252 Comm: syz-executor.4 Not tainted 6.1.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:395 kasan_report+0xd4/0x130 mm/kasan/report.c:495 kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:189 memcpy+0x60/0x90 mm/kasan/shadow.c:66 diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:750 txCommit+0x750/0x5574 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices fs/jfs/jfs_dtree.c:2661 [inline] jfs_readdir+0x1e80/0x37bc fs/jfs/jfs_dtree.c:3009 iterate_dir+0x1f4/0x4e4 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __arm64_sys_getdents64+0x1c4/0x4a0 fs/readdir.c:354 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Allocated by task 4288: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505 __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x74/0x458 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] kmem_cache_alloc_node+0x258/0x3b4 mm/slub.c:3443 __alloc_skb+0x114/0x580 net/core/skbuff.c:505 skb_copy+0xcc/0x670 net/core/skbuff.c:1725 mac80211_hwsim_tx_frame_no_nl+0xdf0/0x1638 drivers/net/wireless/mac80211_hwsim.c:1724 mac80211_hwsim_tx+0x15a8/0x21bc drivers/net/wireless/mac80211_hwsim.c:1935 drv_tx net/mac80211/driver-ops.h:35 [inline] ieee80211_tx_frags+0x340/0x700 net/mac80211/tx.c:1761 __ieee80211_tx+0x1b0/0x40c net/mac80211/tx.c:1815 ieee80211_tx+0x2c4/0x400 net/mac80211/tx.c:1995 ieee80211_xmit+0x278/0x354 net/mac80211/tx.c:2087 __ieee80211_subif_start_xmit+0xc84/0x2af4 net/mac80211/tx.c:4260 ieee80211_subif_start_xmit+0xe0/0x438 net/mac80211/tx.c:4452 __netdev_start_xmit include/linux/netdevice.h:4853 [inline] netdev_start_xmit include/linux/netdevice.h:4867 [inline] xmit_one net/core/dev.c:3627 [inline] dev_hard_start_xmit+0x25c/0x9a4 net/core/dev.c:3643 sch_direct_xmit+0x234/0x548 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3854 [inline] __dev_queue_xmit+0x1658/0x38d8 net/core/dev.c:4259 dev_queue_xmit include/linux/netdevice.h:3021 [inline] neigh_hh_output include/net/neighbour.h:528 [inline] neigh_output include/net/neighbour.h:542 [inline] ip6_finish_output2+0xd78/0x1a88 net/ipv6/ip6_output.c:134 __ip6_finish_output net/ipv6/ip6_output.c:201 [inline] ip6_finish_output+0x5a4/0x940 net/ipv6/ip6_output.c:212 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x270/0x594 net/ipv6/ip6_output.c:233 dst_output include/net/dst.h:444 [inline] NF_HOOK+0x160/0x4f0 include/linux/netfilter.h:302 mld_sendpack+0x90c/0x1364 net/ipv6/mcast.c:1820 mld_send_initial_cr+0x324/0x3d4 net/ipv6/mcast.c:2239 ipv6_mc_dad_complete+0x78/0x380 net/ipv6/mcast.c:2247 addrconf_dad_completed+0x574/0xb40 net/ipv6/addrconf.c:4258 addrconf_dad_work+0xb14/0x1390 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864 Freed by task 4288: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook mm/slub.c:1750 [inline] slab_free mm/slub.c:3661 [inline] kmem_cache_free+0x2f0/0x588 mm/slub.c:3683 kfree_skbmem+0x10c/0x19c __kfree_skb net/core/skbuff.c:871 [inline] kfree_skb_reason+0x1ac/0x47c net/core/skbuff.c:893 kfree_skb include/linux/skbuff.h:1220 [inline] ip6_mc_input+0x928/0xaf8 net/ipv6/ip6_input.c:589 dst_input include/net/dst.h:454 [inline] ip6_sublist_rcv_finish net/ipv6/ip6_input.c:88 [inline] ip6_list_rcv_finish net/ipv6/ip6_input.c:146 [inline] ip6_sublist_rcv+0xd1c/0x1044 net/ipv6/ip6_input.c:320 ipv6_list_rcv+0x3dc/0x430 net/ipv6/ip6_input.c:355 __netif_receive_skb_list_ptype net/core/dev.c:5571 [inline] __netif_receive_skb_list_core+0x5cc/0x754 net/core/dev.c:5619 __netif_receive_skb_list net/core/dev.c:5671 [inline] netif_receive_skb_list_internal+0x810/0xb2c net/core/dev.c:5762 netif_receive_skb_list+0x64/0x73c net/core/dev.c:5814 ieee80211_rx_napi+0x2f8/0x34c net/mac80211/rx.c:5286 ieee80211_rx include/net/mac80211.h:4827 [inline] ieee80211_tasklet_handler+0xf0/0x190 net/mac80211/main.c:315 tasklet_action_common+0x354/0x3f0 tasklet_action+0x60/0x84 kernel/softirq.c:818 __do_softirq+0x314/0xe38 kernel/softirq.c:571 The buggy address belongs to the object at ffff0000cb0df3c0 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 16 bytes to the right of 240-byte region [ffff0000cb0df3c0, ffff0000cb0df4b0) The buggy address belongs to the physical page: page:0000000050159a64 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10b0df flags: 0x5ffe00000000200(slab|node=0|zone=2|lastcpupid=0xfff) raw: 05ffe00000000200 0000000000000000 dead000000000122 ffff0000c0b76600 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000cb0df380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff0000cb0df400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000cb0df480: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ^ ffff0000cb0df500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000cb0df580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ================================================================== ERROR: (device loop4): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 1 non-latin1 character 0x3ff found in JFS file name mount with iocharset=utf8 to access jfs_lookup: dtSearch returned -5 jfs_lookup: dtSearch returned -5