================================================================== BUG: KASAN: use-after-free in crc_itu_t+0xce/0xe0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff88806fc65000 by task syz-executor.0/3618 CPU: 1 PID: 3618 Comm: syz-executor.0 Not tainted 6.1.0-rc4-syzkaller-00362-gfef7fd48922d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15e/0x45d mm/kasan/report.c:395 kasan_report+0xbb/0x1f0 mm/kasan/report.c:495 crc_itu_t+0xce/0xe0 lib/crc-itu-t.c:60 udf_finalize_lvid+0xe0/0x1d0 fs/udf/super.c:2021 udf_sync_fs+0xe6/0x150 fs/udf/super.c:2377 sync_filesystem.part.0+0x75/0x1d0 fs/sync.c:56 sync_filesystem+0x8b/0xc0 fs/sync.c:43 generic_shutdown_super+0x70/0x410 fs/super.c:474 kill_block_super+0x97/0xf0 fs/super.c:1428 deactivate_locked_super+0x94/0x160 fs/super.c:332 deactivate_super+0xad/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0x16b/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f931308caa7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 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 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe2e15aa58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f931308caa7 RDX: 00007ffe2e15ab2a RSI: 000000000000000a RDI: 00007ffe2e15ab20 RBP: 00007ffe2e15ab20 R08: 00000000ffffffff R09: 00007ffe2e15a8f0 R10: 00005555565a38b3 R11: 0000000000000246 R12: 00007f93130e5826 R13: 00007ffe2e15bbe0 R14: 00005555565a3810 R15: 00007ffe2e15bc20 The buggy address belongs to the physical page: page:ffffea0001bf1940 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6fc65 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001baab88 ffffea0001c0c7c8 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 3698, tgid 3696 (syz-executor.0), ts 56838748097, free_ts 56942519569 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x10b5/0x2d50 mm/page_alloc.c:4288 __alloc_pages+0x1c7/0x5a0 mm/page_alloc.c:5555 __folio_alloc+0x12/0x40 mm/page_alloc.c:5587 vma_alloc_folio+0xf9/0x780 mm/mempolicy.c:2246 shmem_alloc_folio+0x107/0x1d0 mm/shmem.c:1561 shmem_alloc_and_acct_folio+0x15e/0x5d0 mm/shmem.c:1585 shmem_get_folio_gfp+0xb49/0x1a60 mm/shmem.c:1913 shmem_get_folio mm/shmem.c:2044 [inline] shmem_write_begin+0x146/0x380 mm/shmem.c:2531 generic_perform_write+0x252/0x570 mm/filemap.c:3753 __generic_file_write_iter+0x2aa/0x4d0 mm/filemap.c:3881 generic_file_write_iter+0xdf/0x350 mm/filemap.c:3913 call_write_iter include/linux/fs.h:2191 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9e9/0xdd0 fs/read_write.c:584 ksys_write+0x127/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 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:1459 [inline] free_pcp_prepare+0x65c/0xd90 mm/page_alloc.c:1509 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page_list+0x172/0xc40 mm/page_alloc.c:3529 release_pages+0xc86/0x1360 mm/swap.c:1055 __pagevec_release+0x77/0x100 mm/swap.c:1075 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] shmem_undo_range+0x8eb/0x12a0 mm/shmem.c:946 shmem_truncate_range mm/shmem.c:1034 [inline] shmem_evict_inode+0x3c6/0xc30 mm/shmem.c:1143 evict+0x2ed/0x6b0 fs/inode.c:664 iput_final fs/inode.c:1747 [inline] iput.part.0+0x59b/0x880 fs/inode.c:1773 iput+0x58/0x70 fs/inode.c:1763 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401 __dentry_kill+0x3c0/0x640 fs/dcache.c:607 dentry_kill fs/dcache.c:733 [inline] dput+0x806/0xdb0 fs/dcache.c:913 __fput+0x3cc/0xa90 fs/file_table.c:328 task_work_run+0x16b/0x270 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 Memory state around the buggy address: ffff88806fc64f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806fc64f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806fc65000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806fc65080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806fc65100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================