loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in dbAllocBits+0x617/0x630 fs/jfs/jfs_dmap.c:2248 Read of size 8 at addr ffff88807ea93eb8 by task syz-executor.0/5456 CPU: 0 PID: 5456 Comm: syz-executor.0 Not tainted 6.6.0-rc3-syzkaller-g6465e260f487 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 dbAllocBits+0x617/0x630 fs/jfs/jfs_dmap.c:2248 dbAllocDmap+0x5c/0x100 fs/jfs/jfs_dmap.c:2025 dbAllocNear fs/jfs/jfs_dmap.c:1251 [inline] dbAlloc+0x780/0xaa0 fs/jfs/jfs_dmap.c:836 ea_get+0xc0d/0x12c0 fs/jfs/xattr.c:514 __jfs_setxattr+0x1ed/0x1050 fs/jfs/xattr.c:718 __jfs_set_acl+0x110/0x1a0 fs/jfs/acl.c:87 jfs_set_acl+0x252/0x330 fs/jfs/acl.c:115 set_posix_acl+0x259/0x320 fs/posix_acl.c:956 vfs_set_acl+0x539/0x900 fs/posix_acl.c:1135 do_set_acl+0xda/0x1b0 fs/posix_acl.c:1280 do_setxattr+0xeb/0x170 fs/xattr.c:627 setxattr+0x159/0x170 fs/xattr.c:653 path_setxattr+0x1a3/0x1d0 fs/xattr.c:672 __do_sys_lsetxattr fs/xattr.c:695 [inline] __se_sys_lsetxattr fs/xattr.c:691 [inline] __x64_sys_lsetxattr+0xc1/0x160 fs/xattr.c:691 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa555a7cb29 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa5568400c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000bd RAX: ffffffffffffffda RBX: 00007fa555b9bf80 RCX: 00007fa555a7cb29 RDX: 0000000020000180 RSI: 0000000020000040 RDI: 0000000020000000 RBP: 00007fa555ac847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000024 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fa555b9bf80 R15: 00007ffce97576b8 The buggy address belongs to the object at ffff88807ea93000 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 [ffff88807ea93000, ffff88807ea93800) The buggy address belongs to the physical page: page:ffffea0001faa400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ea90 head:ffffea0001faa400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888012c42000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5456, tgid 5454 (syz-executor.0), ts 83986249677, free_ts 82342815227 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517 kmalloc_trace+0x25/0xe0 mm/slab_common.c:1114 kmalloc include/linux/slab.h:599 [inline] dbMount+0x50/0xa20 fs/jfs/jfs_dmap.c:164 jfs_mount+0x282/0x890 fs/jfs/jfs_mount.c:121 jfs_fill_super+0x5a3/0xd20 fs/jfs/super.c:556 mount_bdev+0x1f3/0x2e0 fs/super.c:1629 legacy_get_tree+0x109/0x220 fs/fs_context.c:638 vfs_get_tree+0x8c/0x370 fs/super.c:1750 do_new_mount fs/namespace.c:3335 [inline] path_mount+0x1492/0x1ed0 fs/namespace.c:3662 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3478 [inline] __kmem_cache_alloc_node+0x195/0x340 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0x4f/0x100 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:486 load_elf_binary+0x1fe/0x4f10 fs/binfmt_elf.c:860 search_binary_handler fs/exec.c:1739 [inline] exec_binprm fs/exec.c:1781 [inline] bprm_execve fs/exec.c:1856 [inline] bprm_execve+0x7fc/0x1a40 fs/exec.c:1812 do_execveat_common.isra.0+0x5d3/0x740 fs/exec.c:1964 do_execve fs/exec.c:2038 [inline] __do_sys_execve fs/exec.c:2114 [inline] __se_sys_execve fs/exec.c:2109 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2109 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88807ea93d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807ea93e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807ea93e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807ea93f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807ea93f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================