EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) ================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:826 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:945 Read of size 4 at addr ffff888122fbea58 by task kworker/u4:1/9 CPU: 0 PID: 9 Comm: kworker/u4:1 Not tainted 5.10.226-syzkaller-1003431-ge5e5644ea27f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:826 [inline] ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:945 ext4_ext_map_blocks+0x26a/0x6ee0 fs/ext4/extents.c:4138 ext4_map_blocks+0xa65/0x1d10 fs/ext4/inode.c:673 ext4_convert_unwritten_extents+0x2a3/0x5a0 fs/ext4/extents.c:4839 ext4_convert_unwritten_io_end_vec+0x104/0x180 fs/ext4/extents.c:4878 ext4_end_io_end fs/ext4/page-io.c:189 [inline] ext4_do_flush_completed_IO fs/ext4/page-io.c:262 [inline] ext4_end_io_rsv_work+0x358/0x690 fs/ext4/page-io.c:276 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the page: page:ffffea00048bef80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x122fbe flags: 0x4000000000000000() raw: 4000000000000000 dead000000000100 dead000000000122 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 0x100cca(GFP_HIGHUSER_MOVABLE), pid 594, ts 54646248973, free_ts 55160222369 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] shmem_alloc_page+0x257/0x420 mm/shmem.c:1580 shmem_alloc_and_acct_page+0x395/0x8e0 mm/shmem.c:1605 shmem_getpage_gfp+0x891/0x2480 mm/shmem.c:1918 shmem_getpage mm/shmem.c:161 [inline] shmem_write_begin+0xca/0x1b0 mm/shmem.c:2500 generic_perform_write+0x2cd/0x570 mm/filemap.c:3509 __generic_file_write_iter+0x23c/0x560 mm/filemap.c:3638 generic_file_write_iter+0xaf/0x1c0 mm/filemap.c:3670 call_write_iter include/linux/fs.h:2021 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xb4c/0xe70 fs/read_write.c:605 ksys_write+0x199/0x2c0 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:667 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 __pagevec_release+0x84/0x100 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] shmem_undo_range+0x7d1/0x1a60 mm/shmem.c:965 shmem_truncate_range mm/shmem.c:1069 [inline] shmem_evict_inode+0x215/0x9d0 mm/shmem.c:1169 evict+0x526/0x9c0 fs/inode.c:612 iput_final fs/inode.c:1732 [inline] iput+0x632/0x7e0 fs/inode.c:1758 dentry_unlink_inode+0x2ea/0x3d0 fs/dcache.c:378 __dentry_kill+0x447/0x650 fs/dcache.c:583 dentry_kill+0xc0/0x2a0 dput+0x40/0x80 fs/dcache.c:883 __fput+0x52e/0x7b0 fs/file_table.c:294 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x129/0x190 kernel/task_work.c:189 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop+0xbf/0xd0 kernel/entry/common.c:172 Memory state around the buggy address: ffff888122fbe900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888122fbe980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888122fbea00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888122fbea80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888122fbeb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop3): ext4_map_blocks:739: inode #19: block 94489280516: comm kworker/u4:1: lblock 4 mapped to illegal pblock 94489280516 (length 1) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 4: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_map_blocks:739: inode #19: block 4292993006: comm kworker/u4:1: lblock 5 mapped to illegal pblock 4292993006 (length 1) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 5: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 6: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 7: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 8: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 9: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 10: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 11: len 1: ext4_ext_map_blocks returned -117 EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 12: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop2): ext4_map_blocks:739: inode #19: block 224: comm kworker/u4:1: lblock 16 mapped to illegal pblock 224 (length 1) EXT4-fs warning (device loop2): ext4_convert_unwritten_extents:4846: inode #19: block 16: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop2): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop2) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop2): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop2): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop2): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop2): ext4_convert_unwritten_extents:4846: inode #19: block 17: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop2): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop2) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop2): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop2): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop2): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop2): ext4_convert_unwritten_extents:4846: inode #19: block 18: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop2): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_map_blocks:739: inode #19: block 197: comm kworker/u4:1: lblock 5 mapped to illegal pblock 197 (length 1) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 5: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 6: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 7: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 8: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 9: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 10: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 11: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 12: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 13: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 14: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop1): ext4_map_blocks:739: inode #19: block 201: comm kworker/u4:1: lblock 9 mapped to illegal pblock 201 (length 1) EXT4-fs warning (device loop1): ext4_convert_unwritten_extents:4846: inode #19: block 9: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop1): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop1) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop1): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop1): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop1): ext4_map_blocks:739: inode #19: block 10: comm kworker/u4:1: lblock 10 mapped to illegal pblock 10 (length 1) EXT4-fs warning (device loop1): ext4_convert_unwritten_extents:4846: inode #19: block 10: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop1): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop1) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop1): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop1): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop1): ext4_map_blocks:739: inode #19: block 11: comm kworker/u4:1: lblock 11 mapped to illegal pblock 11 (length 1) EXT4-fs warning (device loop1): ext4_convert_unwritten_extents:4846: inode #19: block 11: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop1): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop1): ext4_convert_unwritten_extents:4846: inode #19: block 12: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop1): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop1): ext4_convert_unwritten_extents:4846: inode #19: block 13: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop1): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop4): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop4): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3): ext4_map_blocks:739: inode #19: block 192: comm kworker/u4:1: lblock 0 mapped to illegal pblock 192 (length 1) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 0: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 1: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop3): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop3): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop3): ext4_find_extent:928: inode #19: comm kworker/u4:1: pblk 208 bad header/extent: invalid magic - magic 6f69, entries 29795, max 9324(0), depth 20297(0) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 2: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 3: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 4: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 5: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 6: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs warning (device loop3): ext4_convert_unwritten_extents:4846: inode #19: block 7: len 1: ext4_ext_map_blocks returned -117 EXT4-fs (loop3): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop4): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop4): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop5): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop2): ext4_map_blocks:739: inode #19: block 235: comm kworker/u4:1: lblock 27 mapped to illegal pblock 235 (length 1) EXT4-fs warning (device loop2): ext4_convert_unwritten_extents:4846: inode #19: block 27: len 1: ext4_ext_map_blocks returned -117 EXT4-fs error (device loop2): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0 EXT4-fs error (device loop2) in ext4_reserve_inode_write:5897: Corrupt filesystem EXT4-fs error (device loop2): ext4_convert_unwritten_extents:4847: inode #19: comm kworker/u4:1: mark_inode_dirty error EXT4-fs (loop2): failed to convert unwritten extents to written extents -- potential data loss! (inode 19, error -117) EXT4-fs error (device loop0): __ext4_get_inode_loc:4437: comm kworker/u4:1: Invalid inode table block 34360905424 in block_group 0