================================================================== BUG: KASAN: use-after-free in crc16+0xcf/0xe0 lib/crc16.c:58 Read of size 1 at addr ffff88802a212000 by task syz-executor205/5855 CPU: 1 PID: 5855 Comm: syz-executor205 Not tainted 6.4.0-rc1-syzkaller-00138-gd4d58949a6ea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 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:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 crc16+0xcf/0xe0 lib/crc16.c:58 ext4_group_desc_csum+0x623/0x820 fs/ext4/super.c:3243 ext4_group_desc_csum_set+0xc7/0x1a0 fs/ext4/super.c:3266 ext4_mb_clear_bb fs/ext4/mballoc.c:6206 [inline] ext4_free_blocks+0xf15/0x20e0 fs/ext4/mballoc.c:6352 ext4_remove_blocks fs/ext4/extents.c:2527 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2710 [inline] ext4_ext_remove_space+0x30c5/0x4210 fs/ext4/extents.c:2958 ext4_ext_truncate+0x34b/0x400 fs/ext4/extents.c:4416 ext4_truncate+0xdb5/0x1340 fs/ext4/inode.c:4151 ext4_evict_inode+0x7ef/0x1a30 fs/ext4/inode.c:258 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1747 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1773 iput+0x5c/0x80 fs/inode.c:1763 do_unlinkat+0x432/0x680 fs/namei.c:4400 __do_sys_unlink fs/namei.c:4441 [inline] __se_sys_unlink fs/namei.c:4439 [inline] __x64_sys_unlink+0xca/0x110 fs/namei.c:4439 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7c9b625c89 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 15 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7c9b5d02f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007f7c9b6ab7a0 RCX: 00007f7c9b625c89 RDX: 00007f7c9b625c89 RSI: 00000000000f4240 RDI: 0000000020000000 RBP: 00007f7c9b677a9c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e R13: 3030303030303030 R14: e4948bda8b418d12 R15: 00007f7c9b6ab7a8 The buggy address belongs to the physical page: page:ffffea0000a88480 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x2a212 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 00fff00000000000 ffffea00007b2608 ffffea0000a6eb88 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 5035, tgid 5035 (udevd), ts 48708146693, free_ts 48803832304 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 alloc_pages+0x1aa/0x270 mm/mempolicy.c:2279 folio_alloc+0x20/0x70 mm/mempolicy.c:2289 filemap_alloc_folio+0x3c1/0x470 mm/filemap.c:976 page_cache_ra_unbounded+0x1ae/0x5e0 mm/readahead.c:248 do_page_cache_ra mm/readahead.c:300 [inline] force_page_cache_ra+0x333/0x470 mm/readahead.c:331 page_cache_sync_ra+0x105/0x200 mm/readahead.c:705 page_cache_sync_readahead include/linux/pagemap.h:1211 [inline] filemap_get_pages+0x28d/0x1620 mm/filemap.c:2595 filemap_read+0x35e/0xc70 mm/filemap.c:2690 blkdev_read_iter+0x3eb/0x760 block/fops.c:606 call_read_iter include/linux/fs.h:1862 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x4b1/0x8a0 fs/read_write.c:470 ksys_read+0x12b/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/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:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page_list+0xe3/0xa70 mm/page_alloc.c:2705 release_pages+0xcd8/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] invalidate_mapping_pagevec+0x363/0x440 mm/truncate.c:537 invalidate_bdev+0xb1/0xd0 block/bdev.c:87 ext4_put_super+0x579/0xf00 fs/ext4/super.c:1327 generic_shutdown_super+0x158/0x480 fs/super.c:500 kill_block_super+0xa1/0x100 fs/super.c:1407 deactivate_locked_super+0x98/0x160 fs/super.c:331 deactivate_super+0xb1/0xd0 fs/super.c:362 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1177 task_work_run+0x16f/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+0x210/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297 do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff88802a211f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802a211f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802a212000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802a212080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802a212100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================