EXT4-fs error (device loop0): __ext4_get_inode_loc:4492: comm kworker/u4:4: Invalid inode table block 790638693 in block_group 0
==================================================================
BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
BUG: KASAN: use-after-free in ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:953
Read of size 4 at addr ffff8881269f64cc by task kworker/u4:4/358
CPU: 0 PID: 358 Comm: kworker/u4:4 Not tainted 6.1.25-syzkaller-06995-g368b752997c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x158/0x4e0 mm/kasan/report.c:427
kasan_report+0x13c/0x170 mm/kasan/report.c:531
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
ext4_ext_binsearch fs/ext4/extents.c:837 [inline]
ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:953
ext4_ext_map_blocks+0x255/0x71e0 fs/ext4/extents.c:4103
ext4_map_blocks+0xa42/0x1ce0 fs/ext4/inode.c:651
mpage_map_one_extent fs/ext4/inode.c:2421 [inline]
mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline]
ext4_writepages+0x17b5/0x3fd0 fs/ext4/inode.c:2842
do_writepages+0x385/0x620 mm/page-writeback.c:2472
__writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1590
writeback_sb_inodes+0xb33/0x18f0 fs/fs-writeback.c:1881
wb_writeback+0x3b9/0x9f0 fs/fs-writeback.c:2055
wb_do_writeback fs/fs-writeback.c:2198 [inline]
wb_workfn+0x399/0x1030 fs/fs-writeback.c:2238
process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296
worker_thread+0xa60/0x1260 kernel/workqueue.c:2443
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
The buggy address belongs to the physical page:
page:ffffea00049a7d80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x1269f6
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea00049a7dc8 ffffea00049a7d48 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)
Memory state around the buggy address:
ffff8881269f6380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881269f6400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881269f6480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881269f6500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881269f6580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
------------[ cut here ]------------
kernel BUG at fs/ext4/inode.c:2433!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 358 Comm: kworker/u4:4 Tainted: G B 6.1.25-syzkaller-06995-g368b752997c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Workqueue: writeback wb_workfn (flush-7:0)
RIP: 0010:mpage_map_one_extent fs/ext4/inode.c:2433 [inline]
RIP: 0010:mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline]
RIP: 0010:ext4_writepages+0x3d6f/0x3fd0 fs/ext4/inode.c:2842
Code: e8 f6 06 82 ff be 00 10 00 00 48 c7 c7 90 e4 6b 86 4c 89 f2 e8 d2 8c ab 00 e9 0f fb ff ff e8 d8 06 82 ff 0f 0b e8 d1 06 82 ff <0f> 0b e8 8a c6 01 03 65 8b 05 8b 39 0f 7e 41 89 c7 4c 89 f8 48 c1
RSP: 0018:ffffc90002e2f000 EFLAGS: 00010293
RAX: ffffffff81f2d7bf RBX: dffffc0000000000 RCX: ffff88810efc2880
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002e2f410 R08: ffffffff81f2b4cf R09: ffffed10200aec4d
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8881005762a0 R15: ffffc90002e2f2e0
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020042000 CR3: 000000000640f000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
do_writepages+0x385/0x620 mm/page-writeback.c:2472
__writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1590
writeback_sb_inodes+0xb33/0x18f0 fs/fs-writeback.c:1881
wb_writeback+0x3b9/0x9f0 fs/fs-writeback.c:2055
wb_do_writeback fs/fs-writeback.c:2198 [inline]
wb_workfn+0x399/0x1030 fs/fs-writeback.c:2238
process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296
worker_thread+0xa60/0x1260 kernel/workqueue.c:2443
kthread+0x26d/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:mpage_map_one_extent fs/ext4/inode.c:2433 [inline]
RIP: 0010:mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline]
RIP: 0010:ext4_writepages+0x3d6f/0x3fd0 fs/ext4/inode.c:2842
Code: e8 f6 06 82 ff be 00 10 00 00 48 c7 c7 90 e4 6b 86 4c 89 f2 e8 d2 8c ab 00 e9 0f fb ff ff e8 d8 06 82 ff 0f 0b e8 d1 06 82 ff <0f> 0b e8 8a c6 01 03 65 8b 05 8b 39 0f 7e 41 89 c7 4c 89 f8 48 c1
RSP: 0018:ffffc90002e2f000 EFLAGS: 00010293
RAX: ffffffff81f2d7bf RBX: dffffc0000000000 RCX: ffff88810efc2880
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002e2f410 R08: ffffffff81f2b4cf R09: ffffed10200aec4d
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000000 R14: ffff8881005762a0 R15: ffffc90002e2f2e0
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020042000 CR3: 000000010fbaa000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400