================================================================== BUG: KASAN: use-after-free in crc_itu_t+0x1f9/0x290 lib/crc-itu-t.c:60 Read of size 1 at addr ffff8880783e5000 by task syz.5.626/12006 CPU: 1 UID: 0 PID: 12006 Comm: syz.5.626 Not tainted 6.16.0-rc5-syzkaller-00053-g8c2e52ebbe88 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 crc_itu_t+0x1f9/0x290 lib/crc-itu-t.c:60 udf_update_tag+0x7a/0x6f0 fs/udf/misc.c:261 udf_write_aext+0x4c3/0x7b0 fs/udf/inode.c:2180 udf_update_extents fs/udf/inode.c:1228 [inline] inode_getblk fs/udf/inode.c:919 [inline] udf_map_block+0x355a/0x42a0 fs/udf/inode.c:447 __udf_get_block+0x52/0x250 fs/udf/inode.c:461 __block_write_begin_int+0x6b2/0x1900 fs/buffer.c:2151 block_write_begin+0x8a/0x120 fs/buffer.c:2262 udf_write_begin+0x100/0x260 fs/udf/inode.c:256 generic_perform_write+0x2c4/0x910 mm/filemap.c:4112 udf_file_write_iter+0x2d5/0x6c0 fs/udf/file.c:111 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x548/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdc7158e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdc72412038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fdc717b5fa0 RCX: 00007fdc7158e929 RDX: 00000000fffffdef RSI: 00002000000000c0 RDI: 0000000000000004 RBP: 00007fdc71610b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fdc717b5fa0 R15: 00007ffcc3a866e8 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:ffff88807af36c20 index:0x9ff pfn:0x783e5 memcg:ffff888140492580 aops:shmem_aops ino:6d9 dentry name(?):"memfd:syzkaller" flags: 0xfff0000002003c(referenced|uptodate|dirty|lru|swapbacked|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000002003c ffffea00014680c8 ffffea0001453288 ffff88807af36c20 raw: 00000000000009ff 0000000000000000 00000001ffffffff ffff888140492580 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 11999, tgid 11998 (syz.3.623), ts 471052476969, free_ts 470421510949 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21d5/0x22b0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 folio_alloc_mpol_noprof+0x39/0x70 mm/mempolicy.c:2438 shmem_alloc_folio mm/shmem.c:1851 [inline] shmem_alloc_and_add_folio+0x447/0xf60 mm/shmem.c:1890 shmem_get_folio_gfp+0x59d/0x1660 mm/shmem.c:2536 shmem_get_folio mm/shmem.c:2642 [inline] shmem_write_begin+0xf7/0x2b0 mm/shmem.c:3292 generic_perform_write+0x2c4/0x910 mm/filemap.c:4112 shmem_file_write_iter+0xf8/0x120 mm/shmem.c:3467 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x548/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 10891 tgid 10891 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] free_unref_folios+0xcd2/0x1570 mm/page_alloc.c:2763 folios_put_refs+0x559/0x640 mm/swap.c:992 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x49e/0x14b0 mm/shmem.c:1125 shmem_truncate_range mm/shmem.c:1237 [inline] shmem_evict_inode+0x272/0xa70 mm/shmem.c:1365 evict+0x504/0x9c0 fs/inode.c:810 __dentry_kill+0x209/0x660 fs/dcache.c:669 dput+0x19f/0x2b0 fs/dcache.c:911 __fput+0x68e/0xa70 fs/file_table.c:473 task_work_run+0x1d4/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880783e4f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880783e4f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880783e5000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8880783e5080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880783e5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================