syz.3.304: attempt to access beyond end of device loop3: rw=524288, sector=16, nr_sectors = 8 limit=16 syz.3.304: attempt to access beyond end of device loop3: rw=524288, sector=8669626376, nr_sectors = 16 limit=16 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy_to_page include/linux/highmem.h:403 [inline] BUG: KASAN: slab-out-of-bounds in z_erofs_transform_plain+0x3a7/0x4a0 fs/erofs/decompressor.c:347 Read of size 4095 at addr ffff88802782d100 by task syz.3.304/5188 CPU: 0 PID: 5188 Comm: syz.3.304 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x235/0x290 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 memcpy_to_page include/linux/highmem.h:403 [inline] z_erofs_transform_plain+0x3a7/0x4a0 fs/erofs/decompressor.c:347 z_erofs_decompress_pcluster fs/erofs/zdata.c:1161 [inline] z_erofs_decompress_queue+0x169e/0x24a0 fs/erofs/zdata.c:1242 z_erofs_runqueue+0x198d/0x1b20 fs/erofs/zdata.c:1614 z_erofs_readahead+0xa66/0xde0 fs/erofs/zdata.c:1750 read_pages+0x187/0x860 mm/readahead.c:161 page_cache_ra_unbounded+0x667/0x750 mm/readahead.c:270 filemap_readahead mm/filemap.c:2664 [inline] filemap_get_pages mm/filemap.c:2705 [inline] filemap_read+0x917/0x3150 mm/filemap.c:2783 generic_file_read_iter+0x124/0x700 mm/filemap.c:2965 __kernel_read+0x2dd/0x6e0 fs/read_write.c:428 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0xb12/0x1950 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x503/0xb50 security/integrity/ima/ima_api.c:293 process_measurement+0x119b/0x1c40 security/integrity/ima/ima_main.c:351 ima_file_check+0xc8/0x110 security/integrity/ima/ima_main.c:534 do_open fs/namei.c:3679 [inline] path_openat+0x272b/0x2f10 fs/namei.c:3838 do_filp_open+0x1ee/0x420 fs/namei.c:3865 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9fc5ba9a19 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:00007f9fc6acc028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f9fc5e35fa0 RCX: 00007f9fc5ba9a19 RDX: 0000000000080000 RSI: 0000200000000940 RDI: ffffffffffffff9c RBP: 00007f9fc5c39156 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000071 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9fc5e36038 R14: 00007f9fc5e35fa0 R15: 00007fffcc2f42a8 The buggy address belongs to the physical page: page:ffffea00009e0b40 refcount:2 mapcount:0 mapping:ffff888053c287c8 index:0x1 pfn:0x2782d memcg:ffff888076a36000 aops:managed_cache_aops ino:0 flags: 0xfff40000002014(uptodate|lru|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff40000002014 ffffea0000a39248 ffffea0001c20d88 ffff888053c287c8 raw: 0000000000000001 ffff888053ecb618 00000002ffffffff ffff888076a36000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x192840(GFP_NOWAIT|__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5188, tgid 5187 (syz.3.304), ts 123330325962, free_ts 123330203192 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2561 prep_new_page mm/page_alloc.c:2568 [inline] get_page_from_freelist+0x208b/0x21a0 mm/page_alloc.c:4368 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5668 z_erofs_bind_cache fs/erofs/zdata.c:487 [inline] z_erofs_collector_begin fs/erofs/zdata.c:743 [inline] z_erofs_do_read_page+0x1500/0x3c40 fs/erofs/zdata.c:862 z_erofs_read_folio+0x28a/0x630 fs/erofs/zdata.c:1699 filemap_read_folio+0x164/0x7a0 mm/filemap.c:2514 filemap_update_page mm/filemap.c:2599 [inline] filemap_get_pages mm/filemap.c:2713 [inline] filemap_read+0x1846/0x3150 mm/filemap.c:2783 generic_file_read_iter+0x124/0x700 mm/filemap.c:2965 __kernel_read+0x2dd/0x6e0 fs/read_write.c:428 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0xb12/0x1950 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x503/0xb50 security/integrity/ima/ima_api.c:293 process_measurement+0x119b/0x1c40 security/integrity/ima/ima_main.c:351 ima_file_check+0xc8/0x110 security/integrity/ima/ima_main.c:534 do_open fs/namei.c:3679 [inline] path_openat+0x272b/0x2f10 fs/namei.c:3838 do_filp_open+0x1ee/0x420 fs/namei.c:3865 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1488 [inline] free_pcp_prepare mm/page_alloc.c:1538 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3422 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3517 folio_put include/linux/mm.h:1182 [inline] put_page include/linux/mm.h:1234 [inline] erofs_release_pages+0x138/0x310 fs/erofs/utils.c:28 z_erofs_decompressqueue_work fs/erofs/zdata.c:1256 [inline] z_erofs_decompress_kickoff+0x317/0x400 fs/erofs/zdata.c:1293 z_erofs_submit_queue fs/erofs/zdata.c:1601 [inline] z_erofs_runqueue+0x1972/0x1b20 fs/erofs/zdata.c:1611 z_erofs_readahead+0xa66/0xde0 fs/erofs/zdata.c:1750 read_pages+0x187/0x860 mm/readahead.c:161 page_cache_ra_unbounded+0x667/0x750 mm/readahead.c:270 page_cache_sync_readahead include/linux/pagemap.h:1278 [inline] filemap_get_pages mm/filemap.c:2689 [inline] filemap_read+0x647/0x3150 mm/filemap.c:2783 generic_file_read_iter+0x124/0x700 mm/filemap.c:2965 __kernel_read+0x2dd/0x6e0 fs/read_write.c:428 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 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+0xb12/0x1950 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x503/0xb50 security/integrity/ima/ima_api.c:293 process_measurement+0x119b/0x1c40 security/integrity/ima/ima_main.c:351 ima_file_check+0xc8/0x110 security/integrity/ima/ima_main.c:534 Memory state around the buggy address: ffff88802782df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802782e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802782e080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 ^ ffff88802782e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802782e180: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ==================================================================