================================================================== BUG: KASAN: use-after-free in get_unaligned_le16 include/asm-generic/unaligned.h:27 [inline] BUG: KASAN: use-after-free in LZ4_readLE16 lib/lz4/lz4defs.h:132 [inline] BUG: KASAN: use-after-free in LZ4_decompress_generic lib/lz4/lz4_decompress.c:285 [inline] BUG: KASAN: use-after-free in LZ4_decompress_safe_partial+0xff8/0x1580 lib/lz4/lz4_decompress.c:469 Read of size 2 at addr ffff888061e99000 by task kworker/u5:0/149 CPU: 0 PID: 149 Comm: kworker/u5:0 Not tainted 5.15.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: erofs_unzipd z_erofs_decompressqueue_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x66/0x3e0 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 get_unaligned_le16 include/asm-generic/unaligned.h:27 [inline] LZ4_readLE16 lib/lz4/lz4defs.h:132 [inline] LZ4_decompress_generic lib/lz4/lz4_decompress.c:285 [inline] LZ4_decompress_safe_partial+0xff8/0x1580 lib/lz4/lz4_decompress.c:469 z_erofs_lz4_decompress+0x4c3/0x1100 fs/erofs/decompressor.c:226 z_erofs_decompress_generic fs/erofs/decompressor.c:354 [inline] z_erofs_decompress+0xa8e/0xe30 fs/erofs/decompressor.c:407 z_erofs_decompress_pcluster+0x15e4/0x2550 fs/erofs/zdata.c:977 z_erofs_decompress_queue fs/erofs/zdata.c:1055 [inline] z_erofs_decompressqueue_work+0x123/0x1a0 fs/erofs/zdata.c:1066 process_one_work+0x853/0x1140 kernel/workqueue.c:2297 worker_thread+0xac1/0x1320 kernel/workqueue.c:2444 kthread+0x453/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 The buggy address belongs to the page: page:ffffea000187a640 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x100 pfn:0x61e99 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001abf288 ffffea0001c86348 0000000000000000 raw: 0000000000000100 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x1100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 12207, ts 348571391659, free_ts 349610313077 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0x779/0xa30 mm/page_alloc.c:4153 __alloc_pages+0x255/0x580 mm/page_alloc.c:5375 alloc_pages_vma+0x668/0x1030 mm/mempolicy.c:2152 do_anonymous_page+0x31b/0x14b0 mm/memory.c:3768 handle_pte_fault mm/memory.c:4557 [inline] __handle_mm_fault mm/memory.c:4694 [inline] handle_mm_fault+0x1860/0x2560 mm/memory.c:4792 faultin_page mm/gup.c:937 [inline] __get_user_pages+0x4da/0x11f0 mm/gup.c:1158 populate_vma_page_range+0x217/0x2a0 mm/gup.c:1490 __mm_populate+0x2ea/0x4d0 mm/gup.c:1599 mm_populate include/linux/mm.h:2624 [inline] __do_sys_mlockall+0x31f/0x3b0 mm/mlock.c:799 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0xc29/0xd20 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page_list+0x11f/0xa50 mm/page_alloc.c:3431 release_pages+0x18cb/0x1b00 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu+0x780/0x910 mm/mmu_gather.c:249 zap_pte_range+0x1a11/0x1b90 mm/memory.c:1432 zap_pmd_range mm/memory.c:1481 [inline] zap_pud_range mm/memory.c:1510 [inline] zap_p4d_range mm/memory.c:1531 [inline] unmap_page_range+0x745/0xa20 mm/memory.c:1552 unmap_vmas+0x202/0x390 mm/memory.c:1629 exit_mmap+0x3c6/0x6f0 mm/mmap.c:3171 __mmput+0x111/0x3a0 kernel/fork.c:1115 exit_mm+0x63e/0x7a0 kernel/exit.c:501 do_exit+0x682/0x24e0 kernel/exit.c:812 do_group_exit+0x168/0x2d0 kernel/exit.c:922 get_signal+0x16b0/0x2090 kernel/signal.c:2855 arch_do_signal_or_restart+0x9c/0x730 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x191/0x220 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300 Memory state around the buggy address: ffff888061e98f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888061e98f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888061e99000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888061e99080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888061e99100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================