loop0: detected capacity change from 0 to 32768 ================================================================================ UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2238:2 index 2000 is out of range for type 's64[128]' (aka 'long long[128]') CPU: 0 PID: 5912 Comm: syz-executor.0 Not tainted 6.4.0-rc2-syzkaller-00256-g5565ec4ef4f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 dump_stack+0x1c/0x28 lib/dump_stack.c:113 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:348 dbAllocBits+0x8a4/0x8d0 fs/jfs/jfs_dmap.c:2238 dbAllocDmap fs/jfs/jfs_dmap.c:2015 [inline] dbAllocNear+0x224/0x334 fs/jfs/jfs_dmap.c:1244 dbAlloc+0x8b4/0xb68 fs/jfs/jfs_dmap.c:829 ea_get+0x6f8/0xef0 fs/jfs/xattr.c:514 __jfs_setxattr+0x41c/0x1338 fs/jfs/xattr.c:718 __jfs_set_acl+0x108/0x1a4 fs/jfs/acl.c:87 jfs_set_acl+0x20c/0x478 fs/jfs/acl.c:115 set_posix_acl fs/posix_acl.c:956 [inline] vfs_set_acl+0x728/0x94c fs/posix_acl.c:1135 do_set_acl+0xe4/0x1ac fs/posix_acl.c:1280 do_setxattr fs/xattr.c:627 [inline] setxattr+0x230/0x29c fs/xattr.c:653 path_setxattr+0x17c/0x258 fs/xattr.c:672 __do_sys_lsetxattr fs/xattr.c:695 [inline] __se_sys_lsetxattr fs/xattr.c:691 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:691 __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/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 ================================================================================ ================================================================== BUG: KASAN: slab-out-of-bounds in dbAllocBits+0x7a8/0x8d0 fs/jfs/jfs_dmap.c:2238 Read of size 8 at addr ffff0000c185beb8 by task syz-executor.0/5912 CPU: 0 PID: 5912 Comm: syz-executor.0 Not tainted 6.4.0-rc2-syzkaller-00256-g5565ec4ef4f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x174/0x514 mm/kasan/report.c:462 kasan_report+0xd4/0x130 mm/kasan/report.c:572 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 dbAllocBits+0x7a8/0x8d0 fs/jfs/jfs_dmap.c:2238 dbAllocDmap fs/jfs/jfs_dmap.c:2015 [inline] dbAllocNear+0x224/0x334 fs/jfs/jfs_dmap.c:1244 dbAlloc+0x8b4/0xb68 fs/jfs/jfs_dmap.c:829 ea_get+0x6f8/0xef0 fs/jfs/xattr.c:514 __jfs_setxattr+0x41c/0x1338 fs/jfs/xattr.c:718 __jfs_set_acl+0x108/0x1a4 fs/jfs/acl.c:87 jfs_set_acl+0x20c/0x478 fs/jfs/acl.c:115 set_posix_acl fs/posix_acl.c:956 [inline] vfs_set_acl+0x728/0x94c fs/posix_acl.c:1135 do_set_acl+0xe4/0x1ac fs/posix_acl.c:1280 do_setxattr fs/xattr.c:627 [inline] setxattr+0x230/0x29c fs/xattr.c:653 path_setxattr+0x17c/0x258 fs/xattr.c:672 __do_sys_lsetxattr fs/xattr.c:695 [inline] __se_sys_lsetxattr fs/xattr.c:691 [inline] __arm64_sys_lsetxattr+0xbc/0xd8 fs/xattr.c:691 __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/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Allocated by task 5132: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:510 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x90/0xa8 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc+0xcc/0x1b8 mm/slab_common.c:979 kmalloc include/linux/slab.h:563 [inline] sk_prot_alloc+0xc4/0x1f0 net/core/sock.c:2035 sk_alloc+0x40/0x3d0 net/core/sock.c:2088 __netlink_create+0x80/0x298 net/netlink/af_netlink.c:649 netlink_create+0x3e4/0x6f0 net/netlink/af_netlink.c:712 __sock_create+0x43c/0x884 net/socket.c:1547 sock_create net/socket.c:1598 [inline] __sys_socket_create net/socket.c:1635 [inline] __sys_socket+0x120/0x32c net/socket.c:1663 __do_sys_socket net/socket.c:1676 [inline] __se_sys_socket net/socket.c:1674 [inline] __arm64_sys_socket+0x7c/0x94 net/socket.c:1674 __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/0x198 arch/arm64/kernel/syscall.c:193 el0_svc+0x4c/0x15c arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 Freed by task 0: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:521 ____kasan_slab_free+0x128/0x1a4 mm/kasan/common.c:236 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] __kmem_cache_free+0x220/0x410 mm/slub.c:3799 kfree+0xb8/0x19c mm/slab_common.c:1015 sk_prot_free net/core/sock.c:2071 [inline] __sk_destruct+0x4ac/0x750 net/core/sock.c:2163 sk_destruct net/core/sock.c:2178 [inline] __sk_free+0x37c/0x4e8 net/core/sock.c:2189 sk_free+0x60/0xc8 net/core/sock.c:2200 deferred_put_nlk_sk+0x1f8/0x260 net/netlink/af_netlink.c:747 rcu_do_batch kernel/rcu/tree.c:2115 [inline] rcu_core+0x7f8/0x19f4 kernel/rcu/tree.c:2377 rcu_core_si+0x10/0x1c kernel/rcu/tree.c:2394 __do_softirq+0x2d0/0xd54 kernel/softirq.c:571 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xcc mm/kasan/generic.c:491 kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:501 __call_rcu_common kernel/rcu/tree.c:2627 [inline] call_rcu+0x104/0xaf4 kernel/rcu/tree.c:2741 netlink_release+0x1290/0x17e8 net/netlink/af_netlink.c:828 __sock_release net/socket.c:653 [inline] sock_close+0xb8/0x1fc net/socket.c:1397 __fput+0x30c/0x7bc fs/file_table.c:321 ____fput+0x20/0x30 fs/file_table.c:349 task_work_run+0x230/0x2e0 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2180/0x3c90 arch/arm64/kernel/signal.c:1304 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x90/0x15c arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:591 The buggy address belongs to the object at ffff0000c185b000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1720 bytes to the right of allocated 2048-byte region [ffff0000c185b000, ffff0000c185b800) The buggy address belongs to the physical page: page:0000000020da4c3b refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000c185f000 pfn:0x101858 head:0000000020da4c3b order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000010200 ffff0000c0002900 ffff0000c0000648 fffffc0003059010 raw: ffff0000c185f000 0000000000080004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c185bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c185be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000c185be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000c185bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c185bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== JFS: metapage_get_blocks failed ERROR: (device loop0): release_metapage: metapage_write_one() failed ERROR: (device loop0): remounting filesystem as read-only