loop8: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0xb48/0x15cc fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff0000c393b0c0 by task syz.8.631/9059 CPU: 0 PID: 9059 Comm: syz.8.631 Not tainted 6.1.128-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/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:316 [inline] print_report+0x174/0x4c0 mm/kasan/report.c:427 kasan_report+0xd4/0x130 mm/kasan/report.c:531 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:753 txCommit+0x750/0x5574 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x760/0xa8c fs/jfs/jfs_dtree.c:2663 jfs_readdir+0x18ac/0x3030 fs/jfs/jfs_dtree.c:3019 iterate_dir+0x1f4/0x4ec __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/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 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 4421: 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_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031 kmalloc include/linux/slab.h:563 [inline] kzalloc include/linux/slab.h:699 [inline] ref_tracker_alloc+0x130/0x3dc lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:4043 [inline] netdev_hold include/linux/netdevice.h:4072 [inline] ___neigh_create+0xcec/0x25fc net/core/neighbour.c:657 __neigh_create+0x44/0x58 net/core/neighbour.c:737 ip6_finish_output2+0x1990/0x1b54 net/ipv6/ip6_output.c:129 __ip6_finish_output net/ipv6/ip6_output.c:205 [inline] ip6_finish_output+0x5a4/0x940 net/ipv6/ip6_output.c:216 NF_HOOK_COND include/linux/netfilter.h:291 [inline] ip6_output+0x274/0x594 net/ipv6/ip6_output.c:237 dst_output include/net/dst.h:444 [inline] NF_HOOK include/linux/netfilter.h:302 [inline] ndisc_send_skb+0xc38/0x179c net/ipv6/ndisc.c:511 ndisc_send_rs+0x47c/0x5d4 net/ipv6/ndisc.c:721 addrconf_rs_timer+0x300/0x58c net/ipv6/addrconf.c:3982 call_timer_fn+0x1c0/0xa1c kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x554/0x718 kernel/time/timer.c:1820 run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1833 handle_softirqs+0x318/0xd58 kernel/softirq.c:578 __do_softirq+0x14/0x20 kernel/softirq.c:612 Freed by task 4637: 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+0x2c0/0x4b4 mm/slub.c:3674 kfree+0xcc/0x1b8 mm/slab_common.c:988 ref_tracker_dir_exit+0x174/0x458 lib/ref_tracker.c:27 free_netdev+0x25c/0x41c net/core/dev.c:10815 netdev_run_todo+0xccc/0xe80 net/core/dev.c:10472 rtnl_unlock+0x14/0x20 net/core/rtnetlink.c:147 default_device_exit_batch+0x9f8/0xa70 net/core/dev.c:11461 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x6b8/0xaec net/core/net_namespace.c:640 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 The buggy address belongs to the object at ffff0000c393b000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 64 bytes to the right of 128-byte region [ffff0000c393b000, ffff0000c393b080) The buggy address belongs to the physical page: page:00000000675d6056 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000c393b800 pfn:0x10393b flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000200 fffffc00032c7448 fffffc0003330f88 ffff0000c0002300 raw: ffff0000c393b800 000000000010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c393af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000c393b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000c393b080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c393b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff0000c393b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ERROR: (device loop8): jfs_readdir: JFS:Dtree error: ino = 2, bn=0, index = 0 ERROR: (device loop8): remounting filesystem as read-only