================================================================== BUG: KASAN: use-after-free in udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2073 Write of size 1 at addr ffff88805dc34b78 by task syz-executor153/3540 CPU: 0 PID: 3540 Comm: syz-executor153 Not tainted 6.1.33-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 udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2073 udf_put_super+0xc9/0x160 fs/udf/super.c:2360 generic_shutdown_super+0x130/0x340 fs/super.c:501 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 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f0c55d5b057 Code: 09 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd3d03a4d8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f0c55d5b057 RDX: 00007ffd3d03a599 RSI: 000000000000000a RDI: 00007ffd3d03a590 RBP: 00007ffd3d03a590 R08: 00000000ffffffff R09: 00007ffd3d03a370 R10: 000055555641066b R11: 0000000000000206 R12: 00007ffd3d03b600 R13: 00005555564105f0 R14: 00007ffd3d03a500 R15: 0000000000000001 The buggy address belongs to the physical page: page:ffffea0001770d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x5dc34 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 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 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 9796276131, free_ts 10790478036 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533 split_map_pages+0x246/0x510 mm/compaction.c:97 isolate_freepages_range+0x47c/0x4e0 mm/compaction.c:735 alloc_contig_range+0x62a/0x990 mm/page_alloc.c:9394 __alloc_contig_pages mm/page_alloc.c:9417 [inline] alloc_contig_pages+0x3f0/0x4e0 mm/page_alloc.c:9497 debug_vm_pgtable_alloc_huge_page+0xb9/0x108 mm/debug_vm_pgtable.c:1098 init_args+0xa7d/0xda4 mm/debug_vm_pgtable.c:1221 debug_vm_pgtable+0xaa/0x46b mm/debug_vm_pgtable.c:1259 do_one_initcall+0x265/0x8f0 init/main.c:1303 do_initcall_level+0x157/0x207 init/main.c:1376 do_initcalls+0x49/0x86 init/main.c:1392 kernel_init_freeable+0x473/0x61f init/main.c:1631 kernel_init+0x19/0x290 init/main.c:1519 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 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+0x98/0x570 mm/page_alloc.c:3484 free_contig_range+0x9a/0x150 mm/page_alloc.c:9519 destroy_args+0xfe/0x997 mm/debug_vm_pgtable.c:1031 debug_vm_pgtable+0x416/0x46b mm/debug_vm_pgtable.c:1354 do_one_initcall+0x265/0x8f0 init/main.c:1303 do_initcall_level+0x157/0x207 init/main.c:1376 do_initcalls+0x49/0x86 init/main.c:1392 kernel_init_freeable+0x473/0x61f init/main.c:1631 kernel_init+0x19/0x290 init/main.c:1519 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88805dc34a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805dc34a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805dc34b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805dc34b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805dc34c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================