================================================================== BUG: KASAN: slab-out-of-bounds in jfs_readdir+0x1954/0x3420 fs/jfs/jfs_dtree.c:2903 Read of size 1 at addr ffff88805e5cd058 by task syz.4.36/6038 CPU: 0 UID: 0 PID: 6038 Comm: syz.4.36 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 jfs_readdir+0x1954/0x3420 fs/jfs/jfs_dtree.c:2903 wrap_directory_iterator+0x99/0xe0 fs/readdir.c:67 iterate_dir+0x3a5/0x580 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:399 [inline] __se_sys_getdents64+0xf1/0x280 fs/readdir.c:384 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1e8775ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1e7d595028 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f1e879d6090 RCX: 00007f1e8775ce59 RDX: 0000000000000022 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f1e877f2d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1e879d6128 R14: 00007f1e879d6090 R15: 00007fff819da328 Allocated by task 6022: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4570 [inline] slab_alloc_node mm/slub.c:4899 [inline] kmem_cache_alloc_lru_noprof+0x33c/0x680 mm/slub.c:4918 xas_alloc lib/xarray.c:378 [inline] xas_expand lib/xarray.c:590 [inline] xas_create+0x65b/0x1ba0 lib/xarray.c:661 xas_store+0x9a/0x1880 lib/xarray.c:795 __filemap_add_folio+0xbd4/0x1200 mm/filemap.c:916 filemap_add_folio+0x2de/0x610 mm/filemap.c:967 __filemap_get_folio_mpol+0x457/0xa50 mm/filemap.c:2022 __filemap_get_folio include/linux/pagemap.h:763 [inline] grow_dev_folio fs/buffer.c:954 [inline] grow_buffers fs/buffer.c:1020 [inline] __getblk_slow fs/buffer.c:1038 [inline] bdev_getblk+0x1f6/0x6e0 fs/buffer.c:1358 __getblk include/linux/buffer_head.h:380 [inline] sb_getblk include/linux/buffer_head.h:386 [inline] ocfs2_read_blocks_sync+0x42a/0xbf0 fs/ocfs2/buffer_head_io.c:109 ocfs2_read_locked_inode fs/ocfs2/inode.c:581 [inline] ocfs2_iget+0x853/0x1b50 fs/ocfs2/inode.c:157 ocfs2_init_global_system_inodes+0xc8/0x6e0 fs/ocfs2/super.c:441 ocfs2_initialize_super fs/ocfs2/super.c:2196 [inline] ocfs2_fill_super+0x45b5/0x6980 fs/ocfs2/super.c:993 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694 vfs_get_tree+0x92/0x2a0 fs/super.c:1754 fc_mount fs/namespace.c:1193 [inline] do_new_mount_fc fs/namespace.c:3758 [inline] do_new_mount+0x341/0xd30 fs/namespace.c:3834 do_mount fs/namespace.c:4167 [inline] __do_sys_mount fs/namespace.c:4383 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4360 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805e5ccdc0 which belongs to the cache radix_tree_node of size 576 The buggy address is located 88 bytes to the right of allocated 576-byte region [ffff88805e5ccdc0, ffff88805e5cd000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5e5cc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888040bc1101 flags: 0x80000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000040 ffff88801a08c000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800170017 00000000f5000000 ffff888040bc1101 head: 0080000000000040 ffff88801a08c000 dead000000000100 dead000000000122 head: 0000000000000000 0000000800170017 00000000f5000000 ffff888040bc1101 head: 0080000000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Reclaimable, gfp_mask 0xd2810(GFP_NOWAIT|__GFP_RECLAIMABLE|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6022, tgid 6017 (syz.3.35), ts 114366860345, free_ts 104057403507 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x33c/0x3d0 mm/slub.c:7272 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x373/0x720 mm/slub.c:4652 alloc_from_pcs mm/slub.c:4750 [inline] slab_alloc_node mm/slub.c:4884 [inline] kmem_cache_alloc_lru_noprof+0x433/0x680 mm/slub.c:4918 xas_alloc lib/xarray.c:378 [inline] xas_expand lib/xarray.c:590 [inline] xas_create+0x65b/0x1ba0 lib/xarray.c:661 xas_store+0x9a/0x1880 lib/xarray.c:795 shmem_add_to_page_cache+0x877/0xbf0 mm/shmem.c:922 shmem_alloc_and_add_folio mm/shmem.c:2001 [inline] shmem_get_folio_gfp+0x7e9/0x1a80 mm/shmem.c:2564 shmem_get_folio mm/shmem.c:2670 [inline] shmem_write_begin+0x166/0x320 mm/shmem.c:3303 generic_perform_write+0x2af/0x8b0 mm/filemap.c:4325 shmem_file_write_iter+0xfb/0x120 mm/shmem.c:3478 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x629/0xba0 fs/read_write.c:688 ksys_write+0x156/0x270 fs/read_write.c:740 page last free pid 5706 tgid 5706 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xfa6/0x10f0 mm/page_alloc.c:2943 __slab_free+0x252/0x2a0 mm/slub.c:5613 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4570 [inline] slab_alloc_node mm/slub.c:4899 [inline] kmem_cache_alloc_noprof+0x33b/0x680 mm/slub.c:4906 alloc_filename fs/namei.c:142 [inline] do_getname+0x2e/0x250 fs/namei.c:182 getname include/linux/fs.h:2526 [inline] class_filename_constructor include/linux/fs.h:2553 [inline] do_sys_openat2+0xca/0x200 fs/open.c:1363 do_sys_open fs/open.c:1370 [inline] __do_sys_openat fs/open.c:1386 [inline] __se_sys_openat fs/open.c:1381 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1381 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0x560 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88805e5ccf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805e5ccf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805e5cd000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88805e5cd080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805e5cd100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================