loop7: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in dtCompare fs/jfs/jfs_dtree.c:3643 [inline] BUG: KASAN: use-after-free in dtSearch+0x161b/0x2050 fs/jfs/jfs_dtree.c:650 Read of size 1 at addr ffff88805d0680b8 by task syz.7.2284/10615 CPU: 1 PID: 10615 Comm: syz.7.2284 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 dtCompare fs/jfs/jfs_dtree.c:3643 [inline] dtSearch+0x161b/0x2050 fs/jfs/jfs_dtree.c:650 jfs_lookup+0x152/0x380 fs/jfs/namei.c:1459 lookup_open fs/namei.c:3448 [inline] open_last_lookups fs/namei.c:3540 [inline] path_openat+0x1003/0x2f30 fs/namei.c:3747 do_filp_open+0x1b3/0x3e0 fs/namei.c:3777 do_sys_openat2+0x142/0x4a0 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f005090dfc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f004eb75038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f0050b64fa0 RCX: 00007f005090dfc9 RDX: 0000000000000000 RSI: 0000200000000280 RDI: ffffffffffffff9c RBP: 00007f0050990f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0050b65038 R14: 00007f0050b64fa0 R15: 00007ffe6cd321c8 The buggy address belongs to the page: page:ffffea0001741a00 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x200 pfn:0x5d068 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001821188 ffff88813fffb860 0000000000000000 raw: 0000000000000200 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 10254, ts 243966724024, free_ts 252299798781 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] kmem_cache_alloc+0x195/0x290 mm/slub.c:3238 kmem_cache_zalloc include/linux/slab.h:728 [inline] alloc_buffer_head+0x21/0x100 fs/buffer.c:3311 alloc_page_buffers+0x341/0x600 fs/buffer.c:832 grow_dev_page fs/buffer.c:968 [inline] grow_buffers fs/buffer.c:1014 [inline] __getblk_slow fs/buffer.c:1041 [inline] __getblk_gfp+0x4d2/0xb70 fs/buffer.c:1336 __getblk include/linux/buffer_head.h:416 [inline] reiserfs_breada fs/reiserfs/journal.c:2335 [inline] journal_read+0x7ff/0x3800 fs/reiserfs/journal.c:2447 journal_init+0x1961/0x2360 fs/reiserfs/journal.c:2895 reiserfs_fill_super+0xc7f/0x23e0 fs/reiserfs/super.c:2026 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3562 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x94/0x280 mm/page_alloc.c:3396 free_slab mm/slub.c:2020 [inline] discard_slab mm/slub.c:2026 [inline] __unfreeze_partials+0x1a5/0x200 mm/slub.c:2512 put_cpu_partial+0x12d/0x190 mm/slub.c:2592 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283 ____kasan_kmalloc mm/kasan/common.c:479 [inline] __kasan_kmalloc+0x2f/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:612 [inline] tomoyo_realpath_from_path+0x118/0x610 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1cd/0x510 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x120 security/security.c:1348 vfs_getattr+0x26/0x3a0 fs/stat.c:157 vfs_fstat fs/stat.c:182 [inline] __do_sys_newfstat fs/stat.c:421 [inline] __se_sys_newfstat fs/stat.c:418 [inline] __x64_sys_newfstat+0x104/0x1d0 fs/stat.c:418 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88805d067f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805d068000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805d068080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805d068100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805d068180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================