loop1: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x375e/0x4230 fs/jfs/jfs_dtree.c:2889 Read of size 1 at addr ffff8880b15260f5 by task syz-executor.1/26865 CPU: 0 PID: 26865 Comm: syz-executor.1 Not tainted 6.2.0-rc3-syzkaller-00030-ge8f60cd7db24 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:306 [inline] print_report+0x15e/0x461 mm/kasan/report.c:417 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517 jfs_readdir+0x375e/0x4230 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:0x7f1efce8c0c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1efdb99168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f1efcfabf80 RCX: 00007f1efce8c0c9 RDX: 00000000000000c5 RSI: 0000000020000200 RDI: 0000000000000004 RBP: 00007f1efcee7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd382104bf R14: 00007f1efdb99300 R15: 0000000000022000 Allocated by task 26865: 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:325 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slab.h:761 [inline] slab_alloc_node mm/slab.c:3261 [inline] slab_alloc mm/slab.c:3270 [inline] __kmem_cache_alloc_lru mm/slab.c:3447 [inline] kmem_cache_alloc_lru+0x249/0x7b0 mm/slab.c:3463 alloc_inode_sb include/linux/fs.h:3119 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:259 iget_locked+0x1bb/0x700 fs/inode.c:1286 jfs_iget+0x1e/0x4d0 fs/jfs/inode.c:29 jfs_fill_super+0x6a8/0xc80 fs/jfs/super.c:580 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 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 ffff8880b1526180 which belongs to the cache jfs_ip of size 2240 The buggy address is located 139 bytes to the left of 2240-byte region [ffff8880b1526180, ffff8880b1526a40) The buggy address belongs to the physical page: page:ffffea0002c54980 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880b1526fff pfn:0xb1526 memcg:ffff88802a7b3201 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffff88801be42700 ffffea0002c54850 ffff88801be81b50 raw: ffff8880b1526fff ffff8880b1526180 0000000100000001 ffff88802a7b3201 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x342050(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE|__GFP_RECLAIMABLE), pid 26865, tgid 26862 (syz-executor.1), ts 1392853356889, free_ts 436571126675 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x94/0x390 mm/slab.c:2574 cache_alloc_refill+0x27f/0x380 mm/slab.c:2947 ____cache_alloc mm/slab.c:3023 [inline] ____cache_alloc mm/slab.c:3006 [inline] __do_cache_alloc mm/slab.c:3206 [inline] slab_alloc_node mm/slab.c:3254 [inline] slab_alloc mm/slab.c:3270 [inline] __kmem_cache_alloc_lru mm/slab.c:3447 [inline] kmem_cache_alloc_lru+0x660/0x7b0 mm/slab.c:3463 alloc_inode_sb include/linux/fs.h:3119 [inline] jfs_alloc_inode+0x27/0x60 fs/jfs/super.c:105 alloc_inode+0x61/0x230 fs/inode.c:259 iget_locked+0x1bb/0x700 fs/inode.c:1286 jfs_iget+0x1e/0x4d0 fs/jfs/inode.c:29 jfs_fill_super+0x6a8/0xc80 fs/jfs/super.c:580 mount_bdev+0x351/0x410 fs/super.c:1359 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x132a/0x1e20 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] __free_pages_ok+0x846/0x10b0 mm/page_alloc.c:1702 io_mem_free.part.0+0xb0/0xb9 io_uring/io_uring.c:2588 io_mem_free io_uring/io_uring.c:2583 [inline] io_ring_ctx_free io_uring/io_uring.c:2751 [inline] io_ring_exit_work+0xa86/0xc84 io_uring/io_uring.c:2921 process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 worker_thread+0x669/0x1090 kernel/workqueue.c:2436 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffff8880b1525f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880b1526000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880b1526080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880b1526100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880b1526180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================