syzbot


kernel BUG in ext4_ind_remove_space

Status: fixed on 2022/06/08 16:26
Reported-by: syzbot+60224fb0b28144ba93b7@syzkaller.appspotmail.com
Fix commit: 259dc49deaa2 ext4: limit length to bitmap_maxbytes - blocksize in punch_hole
First crash: 915d, last: 915d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 kernel BUG in ext4_ind_remove_space C inconclusive 1 714d 895d 0/1 upstream: reported C repro on 2022/02/09 11:57
upstream kernel BUG in ext4_ind_remove_space ext4 C error done 10 840d 891d 22/27 fixed on 2023/02/24 13:50
linux-4.19 kernel BUG in ext4_ind_remove_space C error 3 725d 913d 0/1 upstream: reported C repro on 2022/01/23 01:21
android-5-10 kernel BUG in ext4_ind_remove_space C error 55 804d 915d 2/2 fixed on 2022/05/13 02:56

Sample crash report:
EXT4-fs warning (device sda1): ext4_block_to_path:107: block 1074791436 > max in inode 1137
------------[ cut here ]------------
kernel BUG at fs/ext4/indirect.c:1235!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 298 Comm: syz-executor272 Not tainted 5.4.147-syzkaller-00003-g946eff433f93 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_ind_remove_space+0x2033/0x2040 fs/ext4/indirect.c:1235
Code: f8 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 0e f2 ff ff 48 89 df e8 ec 74 d4 ff e9 01 f2 ff ff e8 42 de 80 ff e8 0d 58 a7 ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 55 41 57 41 56 41 55 41 54
RSP: 0018:ffff8881de8cfbd0 EFLAGS: 00010293
RAX: ffffffff81b978b3 RBX: 0000000000000000 RCX: ffff8881e055ee40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: ffff8881de8cfd58 R08: ffffffff81b961a1 R09: ffffed103ede9608
R10: ffffed103ede9608 R11: 0000000000000000 R12: ffff8881de8cfd00
R13: dffffc0000000000 R14: 000000004010040c R15: 0000000000000000
FS:  0000555555e25300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020400002 CR3: 00000001e0601000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ext4_punch_hole+0x8bb/0xf50 fs/ext4/inode.c:4455
 ext4_fallocate+0x11c/0x800 fs/ext4/extents.c:4902
 vfs_fallocate+0x564/0x840 fs/open.c:309
 ksys_fallocate fs/open.c:332 [inline]
 __do_sys_fallocate fs/open.c:340 [inline]
 __se_sys_fallocate fs/open.c:338 [inline]
 __x64_sys_fallocate+0xb9/0x100 fs/open.c:338
 do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f633df220d9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe1244a6b8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f633df220d9
RDX: 0000000001000000 RSI: 0000000000000003 RDI: 0000000000000005
RBP: 00007f633dee60c0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000ffeffeff000 R11: 0000000000000246 R12: 00007f633dee6150
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace ba1df9e04d91cd37 ]---
RIP: 0010:ext4_ind_remove_space+0x2033/0x2040 fs/ext4/indirect.c:1235
Code: f8 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 0e f2 ff ff 48 89 df e8 ec 74 d4 ff e9 01 f2 ff ff e8 42 de 80 ff e8 0d 58 a7 ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 55 41 57 41 56 41 55 41 54
RSP: 0018:ffff8881de8cfbd0 EFLAGS: 00010293
RAX: ffffffff81b978b3 RBX: 0000000000000000 RCX: ffff8881e055ee40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: ffff8881de8cfd58 R08: ffffffff81b961a1 R09: ffffed103ede9608
R10: ffffed103ede9608 R11: 0000000000000000 R12: ffff8881de8cfd00
R13: dffffc0000000000 R14: 000000004010040c R15: 0000000000000000
FS:  0000555555e25300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020400002 CR3: 00000001e0601000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/01/20 05:58 android12-5.4 946eff433f93 5da9499f .config console log report syz C ci2-android-5-4-kasan kernel BUG in ext4_ind_remove_space
* Struck through repros no longer work on HEAD.