loop0: detected capacity change from 0 to 2048 UDF-fs: error (device loop0): udf_read_tagged: read failed, block=4294923874, location=4294923874 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000) ================================================================== BUG: KASAN: use-after-free in crc_itu_t+0x1d1/0x2a0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff888071381000 by task syz-executor118/3539 CPU: 0 PID: 3539 Comm: syz-executor118 Not tainted 6.1.31-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 crc_itu_t+0x1d1/0x2a0 lib/crc-itu-t.c:60 udf_finalize_lvid fs/udf/super.c:2022 [inline] udf_sync_fs+0x1ce/0x380 fs/udf/super.c:2378 sync_filesystem+0xe8/0x220 fs/sync.c:56 generic_shutdown_super+0x6b/0x340 fs/super.c:474 kill_block_super+0x7a/0xe0 fs/super.c:1450 deactivate_locked_super+0xa0/0x110 fs/super.c:332 cleanup_mnt+0x490/0x520 fs/namespace.c:1186 task_work_run+0x246/0x300 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x6fb/0x2300 kernel/exit.c:869 do_group_exit+0x202/0x2b0 kernel/exit.c:1019 __do_sys_exit_group kernel/exit.c:1030 [inline] __se_sys_exit_group kernel/exit.c:1028 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3de5703fb9 Code: Unable to access opcode bytes at 0x7f3de5703f8f. RSP: 002b:00007fff565e0028 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f3de57983f0 RCX: 00007f3de5703fb9 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 RBP: 0000000000000001 R08: ffffffffffffffc0 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 00007f3de57983f0 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 The buggy address belongs to the physical page: page:ffffea0001c4e040 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x71381 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c4e088 ffffea0001c11848 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 3533, tgid 3533 (sshd), ts 48358938045, free_ts 48378151982 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 __folio_alloc+0xf/0x30 mm/page_alloc.c:5591 vma_alloc_folio+0x486/0x990 mm/mempolicy.c:2241 alloc_page_vma include/linux/gfp.h:284 [inline] do_anonymous_page mm/memory.c:4123 [inline] handle_pte_fault mm/memory.c:4962 [inline] __handle_mm_fault mm/memory.c:5106 [inline] handle_mm_fault+0x2e85/0x5330 mm/memory.c:5227 do_user_addr_fault arch/x86/mm/fault.c:1428 [inline] handle_page_fault arch/x86/mm/fault.c:1519 [inline] exc_page_fault+0x58d/0x790 arch/x86/mm/fault.c:1575 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1460 [inline] free_pcp_prepare mm/page_alloc.c:1510 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388 free_unref_page_list+0x107/0x810 mm/page_alloc.c:3530 release_pages+0x2836/0x2b40 mm/swap.c:1055 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261 tlb_finish_mmu+0xce/0x1f0 mm/mmu_gather.c:361 unmap_region+0x29f/0x2f0 mm/mmap.c:2229 do_mas_align_munmap+0xe98/0x15e0 mm/mmap.c:2482 do_mas_munmap+0x246/0x2b0 mm/mmap.c:2540 __vm_munmap+0x268/0x370 mm/mmap.c:2817 __do_sys_munmap mm/mmap.c:2842 [inline] __se_sys_munmap mm/mmap.c:2839 [inline] __x64_sys_munmap+0x5c/0x70 mm/mmap.c:2839 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888071380f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071380f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071381000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888071381080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888071381100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================