================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x1b79/0x4660 fs/jfs/jfs_dtree.c:2894 Read of size 1 at addr ffff88807a5aeed5 by task syz-executor.2/5967 CPU: 1 PID: 5967 Comm: syz-executor.2 Not tainted 6.10.0-rc4-syzkaller-00164-g66cc544fd75c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 jfs_readdir+0x1b79/0x4660 fs/jfs/jfs_dtree.c:2894 wrap_directory_iterator+0x94/0xe0 fs/readdir.c:67 iterate_dir+0x65e/0x820 fs/readdir.c:110 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0x1ef/0x4d0 fs/readdir.c:311 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6cd3a7d0a9 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:00007f6cd48870c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007f6cd3bb4050 RCX: 00007f6cd3a7d0a9 RDX: 00000000000000b8 RSI: 0000000020001fc0 RDI: 0000000000000006 RBP: 00007f6cd3aec074 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f6cd3bb4050 R15: 00007ffdfe84e488 Allocated by task 5966: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] kmem_cache_alloc_lru_noprof+0x139/0x2b0 mm/slub.c:4020 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode fs/inode.c:261 [inline] iget_locked+0x1ad/0x850 fs/inode.c:1280 jfs_iget+0x22/0x3b0 fs/jfs/inode.c:29 jfs_fill_super+0x808/0xc50 fs/jfs/super.c:580 mount_bdev+0x20a/0x2d0 fs/super.c:1659 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807a5ae5c0 which belongs to the cache jfs_ip of size 2240 The buggy address is located 85 bytes to the right of allocated 2240-byte region [ffff88807a5ae5c0, ffff88807a5aee80) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a5a8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88802e160701 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000040 ffff888019f258c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000d000d 00000001ffffefff ffff88802e160701 head: 00fff00000000040 ffff888019f258c0 dead000000000122 0000000000000000 head: 0000000000000000 00000000000d000d 00000001ffffefff ffff88802e160701 head: 00fff00000000003 ffffea0001e96a01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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 0x1d2050(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 5899, tgid 5898 (syz-executor.4), ts 121365117273, free_ts 121333231093 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x2e43/0x2f00 mm/page_alloc.c:3420 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2265 allocate_slab+0x5a/0x2f0 mm/slub.c:2428 new_slab mm/slub.c:2481 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3667 __slab_alloc+0x58/0xa0 mm/slub.c:3757 __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3989 [inline] kmem_cache_alloc_lru_noprof+0x1c5/0x2b0 mm/slub.c:4020 jfs_alloc_inode+0x28/0x70 fs/jfs/super.c:105 alloc_inode fs/inode.c:261 [inline] new_inode_pseudo+0x69/0x1e0 fs/inode.c:1007 new_inode+0x22/0x1d0 fs/inode.c:1033 jfs_fill_super+0x408/0xc50 fs/jfs/super.c:544 mount_bdev+0x20a/0x2d0 fs/super.c:1659 legacy_get_tree+0xee/0x190 fs/fs_context.c:662 vfs_get_tree+0x90/0x2a0 fs/super.c:1780 do_new_mount+0x2be/0xb40 fs/namespace.c:3352 page last free pid 62 tgid 62 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2583 __slab_free+0x31b/0x3d0 mm/slub.c:4348 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3941 [inline] slab_alloc_node mm/slub.c:4001 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4008 f2fs_kmem_cache_alloc_nofail fs/f2fs/f2fs.h:2815 [inline] f2fs_kmem_cache_alloc fs/f2fs/f2fs.h:2825 [inline] add_free_nid+0xdd/0x830 fs/f2fs/node.c:2315 scan_free_nid_bits fs/f2fs/node.c:2466 [inline] __f2fs_build_free_nids fs/f2fs/node.c:2500 [inline] f2fs_build_free_nids+0x514/0x11f0 fs/f2fs/node.c:2565 f2fs_balance_fs_bg+0x167/0x970 fs/f2fs/segment.c:487 f2fs_write_node_pages+0x147/0x6d0 fs/f2fs/node.c:2136 do_writepages+0x359/0x870 mm/page-writeback.c:2634 __writeback_single_inode+0x165/0x10b0 fs/fs-writeback.c:1651 writeback_sb_inodes+0x99c/0x1380 fs/fs-writeback.c:1947 wb_writeback+0x481/0xd40 fs/fs-writeback.c:2127 wb_do_writeback fs/fs-writeback.c:2274 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2314 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 Memory state around the buggy address: ffff88807a5aed80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807a5aee00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807a5aee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807a5aef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807a5aef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================