loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x3a89/0x4290 fs/jfs/jfs_dtree.c:2889 Read of size 1 at addr ffff888072df7f75 by task syz-executor114/5106 CPU: 1 PID: 5106 Comm: syz-executor114 Not tainted 6.3.0-rc3-syzkaller-00026-gfff5a5e7f528 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 jfs_readdir+0x3a89/0x4290 fs/jfs/jfs_dtree.c:2889 iterate_dir+0x1fd/0x6f0 fs/readdir.c:67 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64 fs/readdir.c:354 [inline] __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f27f3cd89b9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe4cb73bf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000000000000f031 RCX: 00007f27f3cd89b9 RDX: 00000000000000c5 RSI: 0000000020000200 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00007ffe4cb73c20 R09: 00007ffe4cb73c20 R10: 0000000000005d45 R11: 0000000000000246 R12: 00007ffe4cb73c1c R13: 00007ffe4cb73c50 R14: 00007ffe4cb73c30 R15: 000000000000001d Allocated by task 5106: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x7f/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:769 [inline] slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x20a/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2686 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:260 new_inode_pseudo fs/inode.c:1019 [inline] new_inode+0x2b/0x280 fs/inode.c:1047 diReadSpecial+0x53/0x710 fs/jfs/jfs_imap.c:422 jfs_mount+0x328/0x8b0 fs/jfs/jfs_mount.c:166 jfs_fill_super+0x5a8/0xd40 fs/jfs/super.c:556 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3042 [inline] path_mount+0x1342/0x1e40 fs/namespace.c:3372 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount fs/namespace.c:3571 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888072df6f00 which belongs to the cache jfs_ip of size 2240 The buggy address is located 1973 bytes to the right of allocated 2240-byte region [ffff888072df6f00, ffff888072df77c0) The buggy address belongs to the physical page: page:ffffea0001cb7c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x72df0 head:ffffea0001cb7c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff888019148c80 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000d000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 5104, tgid 5104 (syz-executor114), ts 62255649891, free_ts 9242485986 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2e20 mm/page_alloc.c:4325 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:5591 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 alloc_slab_page mm/slub.c:1851 [inline] allocate_slab+0x25f/0x390 mm/slub.c:1998 new_slab mm/slub.c:2051 [inline] ___slab_alloc+0xa91/0x1400 mm/slub.c:3193 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292 __slab_alloc_node mm/slub.c:3345 [inline] slab_alloc_node mm/slub.c:3442 [inline] slab_alloc mm/slub.c:3460 [inline] __kmem_cache_alloc_lru mm/slub.c:3467 [inline] kmem_cache_alloc_lru+0x4a8/0x600 mm/slub.c:3483 alloc_inode_sb include/linux/fs.h:2686 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:260 new_inode_pseudo fs/inode.c:1019 [inline] new_inode+0x2b/0x280 fs/inode.c:1047 diReadSpecial+0x53/0x710 fs/jfs/jfs_imap.c:422 jfs_mount+0x328/0x8b0 fs/jfs/jfs_mount.c:166 jfs_fill_super+0x5a8/0xd40 fs/jfs/super.c:556 mount_bdev+0x351/0x410 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x5d5/0xa50 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3482 free_contig_range+0xb5/0x180 mm/page_alloc.c:9531 destroy_args+0x6c4/0x920 mm/debug_vm_pgtable.c:1023 debug_vm_pgtable+0x242a/0x4640 mm/debug_vm_pgtable.c:1403 do_one_initcall+0x102/0x540 init/main.c:1310 do_initcall_level init/main.c:1383 [inline] do_initcalls init/main.c:1399 [inline] do_basic_setup init/main.c:1418 [inline] kernel_init_freeable+0x696/0xc00 init/main.c:1638 kernel_init+0x1e/0x2c0 init/main.c:1526 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff888072df7e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888072df7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888072df7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888072df7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888072df8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================