================================================================== BUG: KASAN: use-after-free in udf_close_lvid+0x6a8/0x9a0 fs/udf/super.c:2035 Write of size 1 at addr ffff888088967728 by task syz-executor.4/5073 CPU: 1 PID: 5073 Comm: syz-executor.4 Not tainted 6.6.0-rc2-syzkaller-00143-gb5cbe7c00aa0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/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+0x175/0x1b0 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:693 kill_block_super+0x41/0x70 fs/super.c:1646 deactivate_locked_super+0xa4/0x110 fs/super.c:481 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1254 task_work_run+0x24a/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:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3f4847de17 Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffcbcb8ca18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f3f4847de17 RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffcbcb8cad0 RBP: 00007ffcbcb8cad0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcbcb8db90 R13: 00007f3f484c73b9 R14: 00000000002c561d R15: 0000000000000009 The buggy address belongs to the physical page: page:ffffea00022259c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x88967 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 ffffea00022259c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 10, migratetype Unmovable, gfp_mask 0x542dc0(GFP_USER|__GFP_NOWARN|__GFP_COMP|__GFP_ZERO|__GFP_ACCOUNT), pid 22076, tgid 22067 (syz-executor.0), ts 705009124417, free_ts 705450609730 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 __get_free_pages+0xc/0x30 mm/page_alloc.c:4477 io_mem_alloc io_uring/io_uring.c:2756 [inline] io_allocate_scq_urings+0x176/0x6a0 io_uring/io_uring.c:3751 io_uring_create+0x73c/0x12e0 io_uring/io_uring.c:3953 io_uring_setup io_uring/io_uring.c:4065 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:4092 [inline] __se_sys_io_uring_setup+0x2b6/0x330 io_uring/io_uring.c:4086 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] __free_pages_ok+0xbc0/0xd00 mm/page_alloc.c:1266 io_rings_free+0x73/0x2b0 io_uring/io_uring.c:2741 io_ring_ctx_free+0x7f9/0xa30 io_uring/io_uring.c:2921 io_ring_exit_work+0x7c1/0x850 io_uring/io_uring.c:3151 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Memory state around the buggy address: ffff888088967600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888088967680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888088967700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888088967780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888088967800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================