BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:827 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:946 Read of size 4 at addr ffff888124402064 by task kworker/u4:0/8 CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:827 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:946 ext4_ext_map_blocks+0x1db/0x6270 fs/ext4/extents.c:4166 ext4_map_blocks+0x97b/0x1b20 fs/ext4/inode.c:674 mpage_map_one_extent fs/ext4/inode.c:2421 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline] ext4_writepages+0x11e7/0x2f90 fs/ext4/inode.c:2842 do_writepages+0x48a/0x6c0 mm/page-writeback.c:2388 __writeback_single_inode+0xd5/0x9c0 fs/fs-writeback.c:1657 writeback_sb_inodes+0x9c0/0x1590 fs/fs-writeback.c:1940 wb_writeback+0x3f1/0x980 fs/fs-writeback.c:2116 wb_do_writeback fs/fs-writeback.c:2263 [inline] wb_workfn+0x38f/0xe20 fs/fs-writeback.c:2304 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the page: page:ffffea0004910080 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x124402 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004910088 ffffea0004910088 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff888124401f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888124401f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888124402000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888124402080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888124402100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: block 35398923679908: comm kworker/u4:0: lblock 0 mapped to illegal pblock 35398923679908 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: block 35398923679910: comm kworker/u4:0: lblock 2 mapped to illegal pblock 35398923679910 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=19 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) __quota_error: 32 callbacks suppressed Quota error (device loop0): qtree_write_dquot: dquota write failed EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) Quota error (device loop0): qtree_write_dquot: dquota write failed EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) Quota error (device loop0): qtree_write_dquot: dquota write failed EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) Quota error (device loop0): qtree_write_dquot: dquota write failed EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #18: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 18 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: block 1262720385026: comm kworker/u4:0: lblock 2 mapped to illegal pblock 1262720385026 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: comm kworker/u4:0: lblock 0 mapped to illegal pblock 0 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: block 2: comm kworker/u4:0: lblock 2 mapped to illegal pblock 2 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs (loop0): Total free blocks count 0 EXT4-fs (loop0): Free/Dirty block details EXT4-fs (loop0): free_blocks=37 EXT4-fs (loop0): dirty_blocks=0 EXT4-fs (loop0): Block reservation details EXT4-fs (loop0): i_reserved_data_blocks=0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:476: comm kworker/u4:0: Invalid block bitmap block 0 in block_group 0 EXT4-fs error (device loop0): ext4_map_blocks:630: inode #3: block 9: comm kworker/u4:0: lblock 0 mapped to illegal pblock 9 (length 1) __quota_error: 11 callbacks suppressed Quota error (device loop0): qtree_write_dquot: dquota write failed EXT4-fs error (device loop0): ext4_write_dquot:6180: comm kworker/u4:0: Failed to commit dquot type 0 EXT4-fs error (device loop0) in ext4_reserve_inode_write:5881: Corrupt filesystem EXT4-fs error (device loop0): ext4_dirty_inode:6085: inode #16: comm kworker/u4:0: mark_inode_dirty error EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 2 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost EXT4-fs error (device loop0): ext4_map_blocks:740: inode #16: comm kworker/u4:0: lblock 0 mapped to illegal pblock 0 (length 1) EXT4-fs (loop0): Delayed block allocation failed for inode 16 at logical offset 0 with max blocks 1 with error 117 EXT4-fs (loop0): This should not happen!! Data will be lost