syz.2.36: attempt to access beyond end of device loop2: 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 ffff88807adf4000 by task syz.2.36/6490 CPU: 0 PID: 6490 Comm: syz.2.36 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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+0x1913/0x1aa0 fs/erofs/zdata.c:1774 z_erofs_read_folio+0x323/0x5c0 fs/erofs/zdata.c:1859 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:0x7fc4bf79c799 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:00007fc4c05dc028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fc4bfa15fa0 RCX: 00007fc4bf79c799 RDX: 0000000000121140 RSI: 0000200000000000 RDI: ffffffffffffff9c RBP: 00007fc4bf832bd9 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000013d R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc4bfa16038 R14: 00007fc4bfa15fa0 R15: 00007ffe8f729b08 Allocated by task 6440: 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 kmem_cache_alloc_bulk+0x452/0x5a0 mm/slub.c:4077 mt_alloc_bulk lib/maple_tree.c:167 [inline] mas_alloc_nodes+0x471/0x8c0 lib/maple_tree.c:1289 mas_node_count_gfp lib/maple_tree.c:1347 [inline] mas_expected_entries+0x20d/0x340 lib/maple_tree.c:5647 vma_iter_bulk_alloc include/linux/mm.h:1000 [inline] dup_mmap kernel/fork.c:682 [inline] dup_mm kernel/fork.c:1692 [inline] copy_mm+0x7d2/0x1d50 kernel/fork.c:1741 copy_process+0x16f7/0x3d80 kernel/fork.c:2506 kernel_clone+0x24b/0x8a0 kernel/fork.c:2914 __do_sys_clone kernel/fork.c:3057 [inline] __se_sys_clone kernel/fork.c:3041 [inline] __x64_sys_clone+0x1b7/0x230 kernel/fork.c:3041 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 Freed by task 6466: 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_bulk+0x33b/0x450 mm/slub.c:3948 mt_free_bulk lib/maple_tree.c:172 [inline] mt_destroy_walk+0xde/0x700 lib/maple_tree.c:5290 mte_destroy_walk lib/maple_tree.c:5339 [inline] __mt_destroy+0x1c2/0x270 lib/maple_tree.c:6497 exit_mmap+0x72a/0xb90 mm/mmap.c:3334 __mmput+0x118/0x3c0 kernel/fork.c:1355 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 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2721 [inline] call_rcu+0x153/0x950 kernel/rcu/tree.c:2837 mas_wr_node_store lib/maple_tree.c:3997 [inline] mas_wr_modify+0x1a5a/0x2a10 lib/maple_tree.c:4231 mas_store_prealloc+0x26d/0x440 lib/maple_tree.c:5463 __mmap_region mm/mmap.c:2848 [inline] mmap_region+0x1384/0x2000 mm/mmap.c:2941 do_mmap+0x92c/0x10a0 mm/mmap.c:1385 vm_mmap_pgoff+0x1c4/0x3f0 mm/util.c:556 elf_map+0x19e/0x2f0 fs/binfmt_elf.c:380 load_elf_interp+0x49c/0xd10 fs/binfmt_elf.c:663 load_elf_binary+0x1a6b/0x2860 fs/binfmt_elf.c:1271 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 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 __call_rcu_common kernel/rcu/tree.c:2721 [inline] call_rcu+0x153/0x950 kernel/rcu/tree.c:2837 mas_wr_node_store lib/maple_tree.c:3997 [inline] mas_wr_modify+0x1a5a/0x2a10 lib/maple_tree.c:4231 mas_store_prealloc+0x26d/0x440 lib/maple_tree.c:5463 __mmap_region mm/mmap.c:2848 [inline] mmap_region+0x1384/0x2000 mm/mmap.c:2941 do_mmap+0x92c/0x10a0 mm/mmap.c:1385 vm_mmap_pgoff+0x1c4/0x3f0 mm/util.c:556 elf_map+0xfd/0x2f0 fs/binfmt_elf.c:376 elf_load+0x86/0x3b0 fs/binfmt_elf.c:398 load_elf_binary+0xf07/0x2860 fs/binfmt_elf.c:1179 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 The buggy address belongs to the object at ffff88807adf4000 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff88807adf4000, ffff88807adf4100) The buggy address belongs to the physical page: page:ffffea0001eb7d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7adf4 head:ffffea0001eb7d00 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888018645000 ffffea0000945500 dead000000000004 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5428, tgid 5428 (dhcpcd), ts 39209625966, free_ts 37310696685 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:4486 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 __kmem_cache_alloc_bulk mm/slub.c:3995 [inline] kmem_cache_alloc_bulk+0x1e6/0x5a0 mm/slub.c:4070 mt_alloc_bulk lib/maple_tree.c:167 [inline] mas_alloc_nodes+0x471/0x8c0 lib/maple_tree.c:1289 mas_node_count_gfp lib/maple_tree.c:1347 [inline] mas_preallocate+0xa62/0x11d0 lib/maple_tree.c:5535 vma_iter_prealloc mm/internal.h:1152 [inline] __split_vma+0x2e9/0xc60 mm/mmap.c:2386 mprotect_fixup+0xab7/0xca0 mm/mprotect.c:650 do_mprotect_pkey+0x7c2/0xcb0 mm/mprotect.c:819 __do_sys_mprotect mm/mprotect.c:840 [inline] __se_sys_mprotect mm/mprotect.c:837 [inline] __x64_sys_mprotect+0x80/0x90 mm/mprotect.c:837 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 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+0x32/0x2e0 mm/page_alloc.c:2458 __slab_free+0x35a/0x400 mm/slub.c:3736 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+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 getname_flags+0xbb/0x500 fs/namei.c:140 vfs_fstatat+0x111/0x1b0 fs/stat.c:298 __do_sys_newfstatat fs/stat.c:463 [inline] __se_sys_newfstatat fs/stat.c:457 [inline] __x64_sys_newfstatat+0x149/0x1f0 fs/stat.c:457 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: ffff88807adf3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807adf3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807adf4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807adf4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807adf4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================