================================================================== BUG: KASAN: use-after-free in udf_close_lvid+0x6a8/0x9a0 fs/udf/super.c:2035 Write of size 1 at addr ffff88806ca074a0 by task syz-executor287/5060 CPU: 1 PID: 5060 Comm: syz-executor287 Not tainted 6.7.0-rc7-syzkaller-00041-gf016f7547aee #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x142/0x170 mm/kasan/report.c:588 udf_close_lvid+0x6a8/0x9a0 fs/udf/super.c:2035 udf_put_super+0xcd/0x160 fs/udf/super.c:2322 generic_shutdown_super+0x13a/0x2c0 fs/super.c:696 kill_block_super+0x44/0x90 fs/super.c:1667 deactivate_locked_super+0xc1/0x130 fs/super.c:484 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1256 task_work_run+0x24a/0x300 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa2c/0x2740 kernel/exit.c:869 do_group_exit+0x206/0x2c0 kernel/exit.c:1018 __do_sys_exit_group kernel/exit.c:1029 [inline] __se_sys_exit_group kernel/exit.c:1027 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1027 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fc926feacc9 Code: Unable to access opcode bytes at 0x7fc926feac9f. RSP: 002b:00007fff70794dd8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fc926feacc9 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001 RBP: 00007fc927086390 R08: ffffffffffffffb8 R09: 000000000001f22a R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc927086390 R13: 0000000000000000 R14: 00007fc927087100 R15: 00007fc926fb8fa0 The buggy address belongs to the physical page: page:ffffea0001b281c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6ca07 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() 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 23408075543, free_ts 25695308748 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1537 split_map_pages+0x24a/0x510 mm/compaction.c:97 isolate_freepages_range+0x476/0x4d0 mm/compaction.c:774 alloc_contig_range+0x62e/0x9a0 mm/page_alloc.c:6411 __alloc_contig_pages mm/page_alloc.c:6434 [inline] alloc_contig_pages+0x3f4/0x4f0 mm/page_alloc.c:6514 debug_vm_pgtable_alloc_huge_page+0xb9/0x110 mm/debug_vm_pgtable.c:1095 init_args+0x837/0xb10 mm/debug_vm_pgtable.c:1277 debug_vm_pgtable+0xe0/0x540 mm/debug_vm_pgtable.c:1315 do_one_initcall+0x234/0x810 init/main.c:1236 do_initcall_level+0x157/0x210 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x429/0x5c0 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x931/0xa60 mm/page_alloc.c:2347 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487 free_contig_range+0x9e/0x160 mm/page_alloc.c:6536 destroy_args+0x8a/0x890 mm/debug_vm_pgtable.c:1028 debug_vm_pgtable+0x4ba/0x540 mm/debug_vm_pgtable.c:1408 do_one_initcall+0x234/0x810 init/main.c:1236 do_initcall_level+0x157/0x210 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x429/0x5c0 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff88806ca07380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ca07400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806ca07480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806ca07500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806ca07580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================