syzbot


kernel BUG in ext4_ext_insert_index

Status: upstream: reported C repro on 2025/05/12 05:54
Reported-by: syzbot+fbce9d1fb2a8d5af8fa7@syzkaller.appspotmail.com
First crash: 3d12h, last: 3d09h

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/ext4/extents.c:1014!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 556 Comm: syz-executor270 Not tainted 5.10.237-syzkaller-00309-g7e2543346ff7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:ext4_ext_insert_index+0x52d/0x530 fs/ext4/extents.c:1014
Code: 4c 89 fa e9 ca fd ff ff 44 89 f1 80 e1 07 fe c1 38 c1 0f 8c dd fd ff ff 4c 89 f7 e8 6d a2 d3 ff e9 d0 fd ff ff e8 e3 b2 99 ff <0f> 0b 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 81 ec c0 00 00
RSP: 0018:ffffc900015f6b20 EFLAGS: 00010293
RAX: ffffffff81c9e01d RBX: ffff888121444424 RCX: ffff888116702780
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: ffffc900015f6b90 R08: dffffc0000000000 R09: ffffed1021f52da5
R10: ffffed1021f52da5 R11: 1ffff11021f52da4 R12: 0000000000000000
R13: 00000000000000cb R14: 00000000fffffffe R15: 0000000000000054
FS:  00007ff268c1a6c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000002000 CR3: 000000011074c000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ext4_ext_split fs/ext4/extents.c:1272 [inline]
 ext4_ext_create_new_leaf fs/ext4/extents.c:1414 [inline]
 ext4_ext_insert_extent+0x38c3/0x4530 fs/ext4/extents.c:2097
 ext4_ext_map_blocks+0x148c/0x5d40 fs/ext4/extents.c:4354
 ext4_map_blocks+0x978/0x1bc0 fs/ext4/inode.c:674
 _ext4_get_block+0x1bb/0x4b0 fs/ext4/inode.c:817
 ext4_get_block_unwritten+0x2a/0x40 fs/ext4/inode.c:848
 ext4_block_write_begin+0x567/0x1330 fs/ext4/inode.c:1101
 ext4_write_begin+0x651/0x1550 fs/ext4/ext4_jbd2.h:-1
 ext4_da_write_begin+0x455/0xe80 fs/ext4/inode.c:3033
 generic_perform_write+0x2be/0x510 mm/filemap.c:3509
 ext4_buffered_write_iter+0x4b8/0x640 fs/ext4/file.c:271
 ext4_file_write_iter+0x536/0x1980 fs/ext4/file.c:-1
 call_write_iter include/linux/fs.h:2058 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x725/0xd60 fs/read_write.c:605
 ksys_pwrite64 fs/read_write.c:712 [inline]
 __do_sys_pwrite64 fs/read_write.c:722 [inline]
 __se_sys_pwrite64 fs/read_write.c:719 [inline]
 __x64_sys_pwrite64+0x191/0x220 fs/read_write.c:719
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff268c7ee89
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 18 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff268c1a218 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007ff268d066d8 RCX: 00007ff268c7ee89
RDX: 00000000200000c1 RSI: 00002000000000c0 RDI: 0000000000000005
RBP: 00007ff268d066d0 R08: 00007ffea5e7ecb7 R09: 0000000000000000
R10: 0000000000009000 R11: 0000000000000246 R12: 00007ff268cd3614
R13: 0031656c69662f2e R14: 00007ffea5e7ebd0 R15: 00007ffea5e7ecb8
Modules linked in:
---[ end trace 5d5530e098fc4a8c ]---
RIP: 0010:ext4_ext_insert_index+0x52d/0x530 fs/ext4/extents.c:1014
Code: 4c 89 fa e9 ca fd ff ff 44 89 f1 80 e1 07 fe c1 38 c1 0f 8c dd fd ff ff 4c 89 f7 e8 6d a2 d3 ff e9 d0 fd ff ff e8 e3 b2 99 ff <0f> 0b 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 81 ec c0 00 00
RSP: 0018:ffffc900015f6b20 EFLAGS: 00010293
RAX: ffffffff81c9e01d RBX: ffff888121444424 RCX: ffff888116702780
RDX: 0000000000000000 RSI: 00000000fffffffe RDI: 0000000000000000
RBP: ffffc900015f6b90 R08: dffffc0000000000 R09: ffffed1021f52da5
R10: ffffed1021f52da5 R11: 1ffff11021f52da4 R12: 0000000000000000
R13: 00000000000000cb R14: 00000000fffffffe R15: 0000000000000054
FS:  00007ff268c1a6c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000008ed0bf CR3: 000000011074c000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/12 07:52 android13-5.10-lts 7e2543346ff7 77908e5f .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
2025/05/12 06:29 android13-5.10-lts 7e2543346ff7 77908e5f .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
2025/05/12 05:47 android13-5.10-lts 7e2543346ff7 77908e5f .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
2025/05/12 07:09 android13-5.10-lts 7e2543346ff7 77908e5f .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
2025/05/12 07:53 android13-5.10-lts 7e2543346ff7 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
2025/05/12 05:02 android13-5.10-lts 7e2543346ff7 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 kernel BUG in ext4_ext_insert_index
* Struck through repros no longer work on HEAD.