syz.8.819: attempt to access beyond end of device loop8: rw=524288, sector=8, nr_sectors = 16 limit=16 syz.8.819: attempt to access beyond end of device loop8: rw=524288, sector=16, nr_sectors = 40 limit=16 ================================================================== BUG: KASAN: slab-use-after-free in memcpy_to_page include/linux/highmem.h:427 [inline] BUG: KASAN: slab-use-after-free in z_erofs_transform_plain+0x3ab/0x4a0 fs/erofs/decompressor.c:347 Read of size 4096 at addr ffff88806a832000 by task syz.8.819/9576 CPU: 0 PID: 9576 Comm: syz.8.819 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:1421 do_sys_open fs/open.c:1436 [inline] __do_sys_open fs/open.c:1444 [inline] __se_sys_open fs/open.c:1440 [inline] __x64_sys_open+0x11f/0x140 fs/open.c:1440 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:0x7f58bb99ce59 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:00007f58bc945028 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f58bbc15fa0 RCX: 00007f58bb99ce59 RDX: 0000000000000009 RSI: 0000000000000080 RDI: 00002000000001c0 RBP: 00007f58bba32e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f58bbc16038 R14: 00007f58bbc15fa0 R15: 00007ffef92fdbf8 Allocated by task 9577: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6a/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x17e/0x2c0 mm/slub.c:3519 vm_area_alloc+0x24/0x1d0 kernel/fork.c:487 __mmap_region mm/mmap.c:2770 [inline] mmap_region+0xcfa/0x2090 mm/mmap.c:2941 do_mmap+0x98f/0x10a0 mm/mmap.c:1385 vm_mmap_pgoff+0x1c4/0x3f0 mm/util.c:556 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 Freed by task 9577: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1811 [inline] slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837 slab_free mm/slub.c:3830 [inline] kmem_cache_free+0xf8/0x290 mm/slub.c:3852 remove_vma mm/mmap.c:146 [inline] exit_mmap+0x61d/0xb90 mm/mmap.c:3326 __mmput+0x118/0x3a0 kernel/fork.c:1357 exit_mm+0x23f/0x340 kernel/exit.c:570 do_exit+0x909/0x2530 kernel/exit.c:871 do_group_exit+0x22d/0x2f0 kernel/exit.c:1026 __do_sys_exit_group kernel/exit.c:1037 [inline] __se_sys_exit_group kernel/exit.c:1035 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1035 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 The buggy address belongs to the object at ffff88806a832000 which belongs to the cache vm_area_struct of size 192 The buggy address is located 0 bytes inside of freed 192-byte region [ffff88806a832000, ffff88806a8320c0) The buggy address belongs to the physical page: page:ffffea0001aa0c80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6a832 memcg:ffff88805d910f01 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888019e4cb40 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000001ffffffff ffff88805d910f01 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 9577, tgid 9577 (rm), ts 525951572805, free_ts 503145531479 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 alloc_slab_page+0x5d/0x180 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253 __slab_alloc mm/slub.c:3339 [inline] __slab_alloc_node mm/slub.c:3392 [inline] slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3503 [inline] __kmem_cache_alloc_lru mm/slub.c:3510 [inline] kmem_cache_alloc+0x109/0x2c0 mm/slub.c:3519 vm_area_alloc+0x24/0x1d0 kernel/fork.c:487 __mmap_region mm/mmap.c:2770 [inline] mmap_region+0xcfa/0x2090 mm/mmap.c:2941 do_mmap+0x98f/0x10a0 mm/mmap.c:1385 vm_mmap_pgoff+0x1c4/0x3f0 mm/util.c:556 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 discard_slab mm/slub.c:2127 [inline] __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667 put_cpu_partial+0x17c/0x250 mm/slub.c:2743 __slab_free+0x319/0x400 mm/slub.c:3700 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xd0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:306 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6a/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3495 [inline] __kmem_cache_alloc_node+0x194/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0xa7/0x240 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] tomoyo_realpath_from_path+0xe6/0x5c0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x282/0x560 security/tomoyo/file.c:822 security_inode_getattr+0xd3/0x120 security/security.c:2154 vfs_getattr fs/stat.c:173 [inline] vfs_fstat fs/stat.c:198 [inline] __do_sys_newfstat fs/stat.c:473 [inline] __se_sys_newfstat fs/stat.c:470 [inline] __x64_sys_newfstat+0x12c/0x250 fs/stat.c:470 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 Memory state around the buggy address: ffff88806a831f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806a831f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806a832000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806a832080: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88806a832100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================