================================================================== BUG: KASAN: use-after-free in crc_itu_t+0xd2/0xe0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff888050c3a000 by task syz-executor.3/3858 CPU: 1 PID: 3858 Comm: syz-executor.3 Not tainted 6.2.0-syzkaller-09238-gd2980d8d8265 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 crc_itu_t+0xd2/0xe0 lib/crc-itu-t.c:60 udf_finalize_lvid+0xe0/0x1d0 fs/udf/super.c:1988 udf_sync_fs+0xea/0x150 fs/udf/super.c:2344 sync_fs_one_sb fs/sync.c:84 [inline] sync_fs_one_sb+0x10b/0x150 fs/sync.c:80 iterate_supers+0x140/0x2a0 fs/super.c:736 ksys_sync+0x9b/0x150 fs/sync.c:103 __do_sys_sync+0xe/0x20 fs/sync.c:113 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f08579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f035cc EFLAGS: 00000296 ORIG_RAX: 0000000000000024 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page:ffffea0001430e80 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x50c3a flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001431408 ffffea0001430908 0000000000000000 raw: 0000000000000001 0000000000000001 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 0x141cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE), pid 3826, tgid 3825 (syz-executor.1), ts 964793009874, free_ts 965675140909 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2f80 mm/page_alloc.c:4325 __alloc_pages+0x1cb/0x5c0 mm/page_alloc.c:5591 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2283 folio_alloc+0x20/0x70 mm/mempolicy.c:2293 filemap_alloc_folio+0x3c1/0x470 mm/filemap.c:976 __filemap_get_folio+0x32b/0xdc0 mm/filemap.c:1970 pagecache_get_page+0x2e/0x280 mm/folio-compat.c:99 ext4_da_write_begin+0x421/0xb70 fs/ext4/inode.c:3073 generic_perform_write+0x256/0x570 mm/filemap.c:3926 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:285 ext4_file_write_iter+0x8bf/0x1710 fs/ext4/file.c:700 call_write_iter include/linux/fs.h:1851 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9ed/0xe10 fs/read_write.c:584 ksys_write+0x12b/0x250 fs/read_write.c:637 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x668/0xb50 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page_list+0x176/0xcd0 mm/page_alloc.c:3528 release_pages+0xcd7/0x1380 mm/swap.c:1042 __pagevec_release+0x77/0xe0 mm/swap.c:1062 pagevec_release include/linux/pagevec.h:63 [inline] folio_batch_release include/linux/pagevec.h:132 [inline] truncate_inode_pages_range+0x2ec/0xec0 mm/truncate.c:372 ext4_evict_inode+0x5f7/0x1b50 fs/ext4/inode.c:221 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1748 [inline] iput.part.0+0x59b/0x8a0 fs/inode.c:1774 iput+0x5c/0x80 fs/inode.c:1764 do_unlinkat+0x42e/0x670 fs/namei.c:4323 __do_sys_unlink fs/namei.c:4364 [inline] __se_sys_unlink fs/namei.c:4362 [inline] __ia32_sys_unlink+0xca/0x110 fs/namei.c:4362 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 Memory state around the buggy address: ffff888050c39f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050c39f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888050c3a000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888050c3a080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888050c3a100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 retq 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi