hpfs: filesystem error: sector 000009f5 not found in external anode ffffffff hpfs: filesystem error: sector 000009f6 not found in external anode ffffffff hpfs: filesystem error: sector 000009f7 not found in external anode ffffffff hpfs: filesystem error: sector 000009f8 not found in external anode ffffffff hpfs: filesystem error: sector 000009f9 not found in external anode ffffffff hpfs: filesystem error: sector 000009fa not found in external anode ffffffff ================================================================== BUG: KASAN: use-after-free in hpfs_bplus_lookup+0x4f4/0x880 fs/hpfs/anode.c:38 Read of size 4 at addr ffff88804bb58004 by task syz.5.71/7044 CPU: 0 UID: 0 PID: 7044 Comm: syz.5.71 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 hpfs_bplus_lookup+0x4f4/0x880 fs/hpfs/anode.c:38 hpfs_bmap+0x230/0x4e0 fs/hpfs/file.c:54 hpfs_get_block+0xa8/0x6e0 fs/hpfs/file.c:87 do_mpage_readpage+0x801/0x1980 fs/mpage.c:222 mpage_readahead+0x407/0x830 fs/mpage.c:371 read_pages+0x193/0x5a0 mm/readahead.c:163 page_cache_ra_unbounded+0x704/0x9b0 mm/readahead.c:304 do_page_cache_ra mm/readahead.c:334 [inline] page_cache_ra_order+0x2b5/0x4b0 mm/readahead.c:538 filemap_readahead mm/filemap.c:2663 [inline] filemap_get_pages+0x832/0x1ea0 mm/filemap.c:2709 filemap_read+0x44a/0x1240 mm/filemap.c:2805 __kernel_read+0x50d/0x9c0 fs/read_write.c:532 integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:480 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:511 [inline] ima_calc_file_hash+0x12cf/0x1800 security/integrity/ima/ima_crypto.c:568 ima_collect_measurement+0x491/0x930 security/integrity/ima/ima_api.c:295 process_measurement+0x12d9/0x1c90 security/integrity/ima/ima_main.c:407 ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:667 security_file_post_open+0xb3/0x260 security/security.c:2653 do_open fs/namei.c:4679 [inline] path_openat+0x2e88/0x38a0 fs/namei.c:4836 do_file_open+0x23e/0x4a0 fs/namei.c:4865 do_sys_openat2+0x113/0x200 fs/open.c:1366 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1383 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f69c870c819 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:00007f69c695e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f69c8985fa0 RCX: 00007f69c870c819 RDX: 0000000000000000 RSI: 0000200000000180 RDI: ffffffffffffff9c RBP: 00007f69c87a2c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f69c8986038 R14: 00007f69c8985fa0 R15: 00007ffc7d5a3078 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x547 pfn:0x4bb58 flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffffea00019e1e08 ffffea00012ed648 0000000000000000 raw: 0000000000000547 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7037, tgid 7036 (syz.0.147), ts 178142539222, free_ts 180790987231 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x28bb/0x2950 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2490 folio_alloc_mpol_noprof+0x39/0xe0 mm/mempolicy.c:2509 shmem_alloc_folio mm/shmem.c:1930 [inline] shmem_alloc_and_add_folio mm/shmem.c:1972 [inline] shmem_get_folio_gfp+0x644/0x1a80 mm/shmem.c:2567 shmem_get_folio mm/shmem.c:2673 [inline] shmem_write_begin+0x166/0x320 mm/shmem.c:3327 generic_perform_write+0x2af/0x8b0 mm/filemap.c:4319 shmem_file_write_iter+0xfb/0x120 mm/shmem.c:3502 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 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 7037 tgid 7036 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] free_unref_folios+0xe7b/0x1c70 mm/page_alloc.c:3040 folios_put_refs+0x56f/0x680 mm/swap.c:1002 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x52c/0x1660 mm/shmem.c:1149 shmem_truncate_range mm/shmem.c:1277 [inline] shmem_evict_inode+0x240/0x9e0 mm/shmem.c:1407 evict+0x61e/0xb10 fs/inode.c:846 __dentry_kill+0x1a2/0x5e0 fs/dcache.c:670 finish_dput+0xc9/0x480 fs/dcache.c:879 __fput+0x6a3/0xa90 fs/file_table.c:477 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x70f/0x23c0 kernel/exit.c:976 do_group_exit+0x21b/0x2d0 kernel/exit.c:1118 get_signal+0x125c/0x1310 kernel/signal.c:3034 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88804bb57f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804bb57f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804bb58000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804bb58080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804bb58100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================