loop4: rw=524288, sector=8, nr_sectors = 16 limit=16 syz.4.3009: attempt to access beyond end of device loop4: 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 ffff88802bcab000 by task syz.4.3009/17243 CPU: 1 PID: 17243 Comm: syz.4.3009 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:0x7f9f3319c819 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:00007f9f34029028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f9f33415fa0 RCX: 00007f9f3319c819 RDX: 0000000000080000 RSI: 0000200000000100 RDI: ffffffffffffff9c RBP: 00007f9f33232c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9f33416038 R14: 00007f9f33415fa0 R15: 00007ffe30a51fd8 Allocated by task 15124: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:53 ____kasan_kmalloc mm/kasan/common.c:375 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0xb4/0x230 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] hash_ipportnet6_add+0x11f0/0x2e70 net/netfilter/ipset/ip_set_hash_gen.h:880 hash_ipportnet6_uadt+0xaa6/0xe30 net/netfilter/ipset/ip_set_hash_ipportnet.c:504 call_ad+0x188/0xb40 net/netfilter/ipset/ip_set_core.c:1751 ip_set_ad+0x81a/0x9c0 net/netfilter/ipset/ip_set_core.c:1841 nfnetlink_rcv_msg+0xbf0/0x12b0 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545 nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594 ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648 __sys_sendmmsg+0x2ca/0x510 net/socket.c:2734 __do_sys_sendmmsg net/socket.c:2763 [inline] __se_sys_sendmmsg net/socket.c:2760 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2760 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 kvfree_call_rcu+0xee/0x790 kernel/rcu/tree.c:3452 hash_ipportnet6_add+0x226a/0x2e70 net/netfilter/ipset/ip_set_hash_gen.h:991 hash_ipportnet6_uadt+0xaa6/0xe30 net/netfilter/ipset/ip_set_hash_ipportnet.c:504 call_ad+0x188/0xb40 net/netfilter/ipset/ip_set_core.c:1751 ip_set_ad+0x81a/0x9c0 net/netfilter/ipset/ip_set_core.c:1841 nfnetlink_rcv_msg+0xbf0/0x12b0 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545 nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594 ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648 __sys_sendmmsg+0x2ca/0x510 net/socket.c:2734 __do_sys_sendmmsg net/socket.c:2763 [inline] __se_sys_sendmmsg net/socket.c:2760 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2760 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 ffff88802bcab000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of freed 128-byte region [ffff88802bcab000, ffff88802bcab080) The buggy address belongs to the physical page: page:ffffea0000af2ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802bcabd00 pfn:0x2bcab flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888017c418c0 ffffea00017c5790 ffffea0001a1e210 raw: ffff88802bcabd00 0000000000100008 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 0x112820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 14370, tgid 14367 (syz.4.2269), ts 852828489135, free_ts 849103013241 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] __kmem_cache_alloc_node+0x19e/0x250 mm/slub.c:3534 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0xa4/0x230 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] hash_ipportnet6_resize+0xc51/0x1e50 net/netfilter/ipset/ip_set_hash_gen.h:706 call_ad+0x454/0xb40 net/netfilter/ipset/ip_set_core.c:1757 ip_set_ad+0x81a/0x9c0 net/netfilter/ipset/ip_set_core.c:1841 nfnetlink_rcv_msg+0xbf0/0x12b0 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545 nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894 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 __folio_batch_release+0x71/0xe0 mm/swap.c:1042 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x3b9/0xfb0 mm/truncate.c:396 kill_bdev block/bdev.c:76 [inline] blkdev_flush_mapping+0x132/0x290 block/bdev.c:649 blkdev_put_whole block/bdev.c:680 [inline] blkdev_put+0x498/0x760 block/bdev.c:958 blkdev_release+0x84/0x90 block/fops.c:604 __fput+0x234/0x970 fs/file_table.c:384 task_work_run+0x1d4/0x260 kernel/task_work.c:245 get_signal+0x1235/0x13f0 kernel/signal.c:2678 arch_do_signal_or_restart+0xc2/0x800 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 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/0xa0 arch/x86/entry/common.c:82 Memory state around the buggy address: ffff88802bcaaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802bcaaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802bcab000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802bcab080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802bcab100: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ==================================================================