syz.0.12: attempt to access beyond end of device loop0: rw=524288, sector=8, nr_sectors = 16 limit=16 syz.0.12: attempt to access beyond end of device loop0: 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+0x38c/0x460 fs/erofs/decompressor.c:346 Read of size 4096 at addr ffff888021292000 by task syz.0.12/5892 CPU: 1 PID: 5892 Comm: syz.0.12 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/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+0x38c/0x460 fs/erofs/decompressor.c:346 z_erofs_decompress_pcluster fs/erofs/zdata.c:1296 [inline] z_erofs_decompress_queue+0x1780/0x26f0 fs/erofs/zdata.c:1377 z_erofs_runqueue+0x1a4e/0x1bf0 fs/erofs/zdata.c:1778 z_erofs_read_folio+0x323/0x5c0 fs/erofs/zdata.c:1863 filemap_read_folio+0x172/0x760 mm/filemap.c:2420 filemap_update_page mm/filemap.c:2504 [inline] filemap_get_pages+0x13c7/0x1e90 mm/filemap.c:2618 filemap_read+0x402/0xf00 mm/filemap.c:2690 __kernel_read+0x2f3/0x710 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+0x91d/0x1910 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4d4/0xa20 security/integrity/ima/ima_api.c:290 process_measurement+0x128e/0x1d70 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+0x28b7/0x3230 fs/namei.c:3797 do_filp_open+0x1f5/0x430 fs/namei.c:3824 do_sys_openat2+0x134/0x1d0 fs/open.c:1421 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1447 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f8b8079c819 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:00007f8b8162c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f8b80a16180 RCX: 00007f8b8079c819 RDX: 0000000000080000 RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f8b80832c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8b80a16218 R14: 00007f8b80a16180 R15: 00007ffd6050c708 Allocated by task 5716: 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+0x6e/0x4b0 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+0x11a/0x2d0 mm/slub.c:3519 anon_vma_chain_alloc mm/rmap.c:142 [inline] __anon_vma_prepare+0x68/0x430 mm/rmap.c:196 anon_vma_prepare include/linux/rmap.h:159 [inline] do_cow_fault mm/memory.c:4660 [inline] do_fault mm/memory.c:4777 [inline] do_pte_missing mm/memory.c:3689 [inline] handle_pte_fault mm/memory.c:5047 [inline] __handle_mm_fault mm/memory.c:5188 [inline] handle_mm_fault+0x40ed/0x4c00 mm/memory.c:5353 do_user_addr_fault+0x730/0x12c0 arch/x86/mm/fault.c:1371 handle_page_fault arch/x86/mm/fault.c:1463 [inline] exc_page_fault+0x64/0x100 arch/x86/mm/fault.c:1516 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 Freed by task 5716: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 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/0x270 mm/slub.c:3852 anon_vma_chain_free mm/rmap.c:147 [inline] unlink_anon_vmas+0x2cc/0x660 mm/rmap.c:422 free_pgtables+0x4ff/0x770 mm/memory.c:400 exit_mmap+0x420/0xb90 mm/mmap.c:3313 __mmput+0x118/0x3c0 kernel/fork.c:1356 exit_mm+0x1f2/0x2c0 kernel/exit.c:569 do_exit+0x8dd/0x2460 kernel/exit.c:870 do_group_exit+0x21b/0x2d0 kernel/exit.c:1024 __do_sys_exit_group kernel/exit.c:1035 [inline] __se_sys_exit_group kernel/exit.c:1033 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 The buggy address belongs to the object at ffff888021292000 which belongs to the cache anon_vma_chain of size 80 The buggy address is located 0 bytes inside of freed 80-byte region [ffff888021292000, ffff888021292050) The buggy address belongs to the physical page: page:ffffea000084a480 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888021292f50 pfn:0x21292 anon flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888019e4c280 ffffea0000b1ab00 0000000000000005 raw: ffff888021292f50 000000008024001a 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5716, tgid 5716 (sed), ts 69181229196, free_ts 69179109457 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1581 prep_new_page mm/page_alloc.c:1588 [inline] get_page_from_freelist+0x1951/0x19e0 mm/page_alloc.c:3220 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4500 alloc_slab_page+0x5d/0x160 mm/slub.c:1881 allocate_slab mm/slub.c:2028 [inline] new_slab+0x87/0x2d0 mm/slub.c:2081 ___slab_alloc+0xc5d/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+0x1b3/0x2d0 mm/slub.c:3519 anon_vma_chain_alloc mm/rmap.c:142 [inline] __anon_vma_prepare+0x68/0x430 mm/rmap.c:196 anon_vma_prepare include/linux/rmap.h:159 [inline] do_cow_fault mm/memory.c:4660 [inline] do_fault mm/memory.c:4777 [inline] do_pte_missing mm/memory.c:3689 [inline] handle_pte_fault mm/memory.c:5047 [inline] __handle_mm_fault mm/memory.c:5188 [inline] handle_mm_fault+0x40ed/0x4c00 mm/memory.c:5353 do_user_addr_fault+0x730/0x12c0 arch/x86/mm/fault.c:1371 handle_page_fault arch/x86/mm/fault.c:1463 [inline] exc_page_fault+0x64/0x100 arch/x86/mm/fault.c:1516 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1181 [inline] free_unref_page_prepare+0x7b2/0x8c0 mm/page_alloc.c:2365 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2504 release_pages+0x1f7a/0x2200 mm/swap.c:1022 tlb_batch_pages_flush mm/mmu_gather.c:99 [inline] tlb_flush_mmu_free mm/mmu_gather.c:294 [inline] tlb_flush_mmu+0x379/0x510 mm/mmu_gather.c:301 tlb_finish_mmu+0xf9/0x220 mm/mmu_gather.c:425 exit_mmap+0x428/0xb90 mm/mmap.c:3315 __mmput+0x118/0x3c0 kernel/fork.c:1356 exec_mmap+0x595/0x650 fs/exec.c:1036 begin_new_exec+0xa2e/0x1eb0 fs/exec.c:1294 load_elf_binary+0x980/0x2860 fs/binfmt_elf.c:1027 search_binary_handler fs/exec.c:1775 [inline] exec_binprm fs/exec.c:1817 [inline] bprm_execve+0xb08/0x1700 fs/exec.c:1892 do_execveat_common+0x51b/0x6c0 fs/exec.c:1998 do_execve fs/exec.c:2072 [inline] __do_sys_execve fs/exec.c:2148 [inline] __se_sys_execve fs/exec.c:2143 [inline] __x64_sys_execve+0x92/0xa0 fs/exec.c:2143 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888021291f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888021291f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888021292000: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fb fb ^ ffff888021292080: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ffff888021292100: fb fb fb fb fb fb fc fc fc fc fb fb fb fb fb fb ==================================================================