syz.3.1057: attempt to access beyond end of device loop3: rw=524288, sector=8, nr_sectors = 16 limit=16 syz.3.1057: attempt to access beyond end of device loop3: rw=524288, sector=16, nr_sectors = 40 limit=16 ================================================================== BUG: KASAN: use-after-free in memcpy_to_page include/linux/highmem.h:427 [inline] BUG: KASAN: use-after-free in z_erofs_transform_plain+0x3ab/0x4a0 fs/erofs/decompressor.c:347 Read of size 4096 at addr ffff888054126000 by task syz.3.1057/10314 CPU: 0 PID: 10314 Comm: syz.3.1057 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x241/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 memcpy_to_page include/linux/highmem.h:427 [inline] z_erofs_transform_plain+0x3ab/0x4a0 fs/erofs/decompressor.c:347 z_erofs_decompress_pcluster fs/erofs/zdata.c:1296 [inline] z_erofs_decompress_queue+0x1705/0x2670 fs/erofs/zdata.c:1377 z_erofs_runqueue+0x1993/0x1b20 fs/erofs/zdata.c:1778 z_erofs_read_folio+0x321/0x5c0 fs/erofs/zdata.c:1863 filemap_read_folio+0x16b/0x790 mm/filemap.c:2420 filemap_update_page mm/filemap.c:2504 [inline] filemap_get_pages+0x13ac/0x1f10 mm/filemap.c:2618 filemap_read+0x409/0xf20 mm/filemap.c:2690 __kernel_read+0x2e5/0x730 fs/read_write.c:428 integrity_kernel_read+0x8a/0xd0 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+0xb1f/0x1960 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa30 security/integrity/ima/ima_api.c:290 process_measurement+0x123a/0x1d50 security/integrity/ima/ima_main.c:370 ima_file_check+0xcc/0x110 security/integrity/ima/ima_main.c:568 do_open fs/namei.c:3642 [inline] path_openat+0x2910/0x3270 fs/namei.c:3797 do_filp_open+0x1f2/0x430 fs/namei.c:3824 do_sys_openat2+0x134/0x1d0 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fd212f9de59 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:00007fd213dd2028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fd213225fa0 RCX: 00007fd212f9de59 RDX: 00000000000c8000 RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007fd213033e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd213226038 R14: 00007fd213225fa0 R15: 00007ffec0f061f8 The buggy address belongs to the physical page: page:ffffea0001504980 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54126 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 ffffea00015049c8 ffffea00014cb648 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x100dc0(GFP_USER|__GFP_ZERO), pid 10291, tgid 10289 (syz.3.1054), ts 579756503362, free_ts 580502361653 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582 prep_new_page mm/page_alloc.c:1589 [inline] get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501 lbmLogInit fs/jfs/jfs_logmgr.c:1816 [inline] lmLogInit+0x32c/0x1a50 fs/jfs/jfs_logmgr.c:1270 open_inline_log fs/jfs/jfs_logmgr.c:1175 [inline] lmLogOpen+0x4f1/0xfa0 fs/jfs/jfs_logmgr.c:1069 jfs_mount_rw+0xf4/0x670 fs/jfs/jfs_mount.c:257 jfs_fill_super+0x581/0xab0 fs/jfs/super.c:565 mount_bdev+0x21c/0x2c0 fs/super.c:1643 legacy_get_tree+0xea/0x180 fs/fs_context.c:662 vfs_get_tree+0x8c/0x280 fs/super.c:1764 do_new_mount+0x24a/0xa40 fs/namespace.c:3386 do_mount fs/namespace.c:3726 [inline] __do_sys_mount fs/namespace.c:3935 [inline] __se_sys_mount+0x2e7/0x3d0 fs/namespace.c:3912 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1182 [inline] free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459 lbmLogShutdown fs/jfs/jfs_logmgr.c:1864 [inline] lmLogShutdown+0x44f/0x850 fs/jfs/jfs_logmgr.c:1684 lmLogClose+0x28c/0x530 fs/jfs/jfs_logmgr.c:1460 jfs_umount+0x2ca/0x3a0 fs/jfs/jfs_umount.c:114 jfs_put_super+0x8c/0x190 fs/jfs/super.c:194 generic_shutdown_super+0x134/0x2b0 fs/super.c:693 kill_block_super+0x44/0x90 fs/super.c:1660 deactivate_locked_super+0x97/0x100 fs/super.c:481 cleanup_mnt+0x3d7/0x460 fs/namespace.c:1259 task_work_run+0x1d4/0x260 kernel/task_work.c:245 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888054125f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888054125f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888054126000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888054126080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888054126100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================