REISERFS (device loop0): journal params: device loop0, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30 REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using r5 hash to sort names ================================================================== BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:68 [inline] BUG: KASAN: use-after-free in _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] BUG: KASAN: use-after-free in test_bit_le include/asm-generic/bitops/le.h:21 [inline] BUG: KASAN: use-after-free in reiserfs_readdir_inode+0x5dc/0x14c0 fs/reiserfs/dir.c:147 Read of size 8 at addr ffff888072b05000 by task syz-executor.0/5475 CPU: 0 PID: 5475 Comm: syz-executor.0 Not tainted 6.7.0-rc8-syzkaller-00174-g95c8a35f1c01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 kasan_check_range+0x27e/0x290 mm/kasan/generic.c:187 instrument_atomic_read include/linux/instrumented.h:68 [inline] _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline] test_bit_le include/asm-generic/bitops/le.h:21 [inline] reiserfs_readdir_inode+0x5dc/0x14c0 fs/reiserfs/dir.c:147 iterate_dir+0x1cd/0x540 fs/readdir.c:106 __do_sys_getdents64 fs/readdir.c:405 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:390 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f063447cae9 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:00007f063526f0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f063459bf80 RCX: 00007f063447cae9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f06344c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f063459bf80 R15: 00007ffc4cc385d8 The buggy address belongs to the physical page: page:ffffea0001cac140 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x72b05 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea0001cac188 ffff8880b9842270 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 5054, tgid 5054 (syz-executor), ts 54104574320, free_ts 83552459999 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0x33ea/0x3570 mm/page_alloc.c:3312 __alloc_pages+0x255/0x680 mm/page_alloc.c:4568 alloc_pages_mpol+0x3de/0x640 mm/mempolicy.c:2133 alloc_pages mm/mempolicy.c:2204 [inline] folio_alloc+0x12a/0x330 mm/mempolicy.c:2211 filemap_alloc_folio+0xde/0x500 mm/filemap.c:974 page_cache_ra_unbounded+0x1f2/0x7c0 mm/readahead.c:247 filemap_readahead mm/filemap.c:2472 [inline] filemap_get_pages+0x742/0x2080 mm/filemap.c:2513 filemap_read+0x41b/0xec0 mm/filemap.c:2593 __kernel_read+0x425/0x8b0 fs/read_write.c:428 integrity_kernel_read+0xb0/0xf0 security/integrity/iint.c:221 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0xad1/0x1b30 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x554/0xb30 security/integrity/ima/ima_api.c:290 process_measurement+0x1373/0x21c0 security/integrity/ima/ima_main.c:359 ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:557 do_open fs/namei.c:3624 [inline] path_openat+0x2897/0x3290 fs/namei.c:3779 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page_list+0x5a0/0x840 mm/page_alloc.c:2533 release_pages+0x2117/0x2400 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x457/0xf70 mm/truncate.c:371 ext4_evict_inode+0x21c/0xf30 fs/ext4/inode.c:193 evict+0x2a4/0x630 fs/inode.c:666 do_unlinkat+0x512/0x830 fs/namei.c:4389 __do_sys_unlink fs/namei.c:4430 [inline] __se_sys_unlink fs/namei.c:4428 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4428 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff888072b04f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888072b04f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888072b05000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888072b05080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888072b05100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================