syzbot


kernel BUG in ext4_mb_load_buddy_gfp

Status: fixed on 2023/03/28 12:29
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+6be2b977c89f79b6b153@syzkaller.appspotmail.com
Fix commit: cf18e5eb5ef2 UPSTREAM: ext4: fix another off-by-one fsmap error on 1k block filesystems
First crash: 725d, last: 608d
Cause bisection: failed (error log, bisect log)
  
Discussions (4)
Title Replies (including bot) Last reply
[PATCH] ext4: fix another off-by-one fsmap error on 1k block filesystems 8 (8) 2023/03/08 04:33
[PATCH 0/3] ext4: fsmap: Improve key validation 6 (6) 2023/03/06 15:55
[PATCH] ext4: reject 1k block fs on the first block of disk 8 (8) 2023/02/22 15:27
[PATCH] ext4: fix underflow in group bitmap calculation 4 (4) 2022/12/23 05:08
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 kernel BUG in ext4_mb_load_buddy_gfp (2) origin:upstream missing-backport C error done 24 518d 565d 0/2 upstream: reported C repro on 2023/05/06 10:12
android-5-10 kernel BUG in ext4_free_blocks 3 1074d 1106d 0/2 auto-closed as invalid on 2022/03/13 09:34
android-6-1 kernel BUG in ext4_mb_load_buddy_gfp C error done 42 398d 554d 0/2 auto-obsoleted due to no activity on 2023/12/29 16:31
linux-4.14 kernel BUG in ext4_mb_load_buddy_gfp ext4 C 6 628d 1302d 0/1 upstream: reported C repro on 2021/04/29 16:39
android-5-10 kernel BUG in ext4_free_blocks (2) ext4 C error 25 569d 871d 2/2 fixed on 2023/05/04 14:51
linux-4.19 kernel BUG at fs/ext4/ext4.h:LINE! ext4 C error 13 648d 1467d 0/1 upstream: reported C repro on 2020/11/15 12:08
android-5-10 kernel BUG in ext4_mb_load_buddy_gfp C error error 28 81d 566d 0/2 upstream: reported C repro on 2023/05/04 23:52
android-54 kernel BUG at fs/ext4/ext4.h:LINE! ext4 C 438 12d 1505d 0/2 upstream: reported C repro on 2020/10/08 13:59
Last patch testing requests (5)
Created Duration User Patch Repo Result
2022/12/28 03:13 17m jun.nie@linaro.org patch upstream OK log
2022/12/27 09:02 7m jun.nie@linaro.org patch upstream report log
2022/12/21 09:47 20m jun.nie@linaro.org patch upstream OK log
2022/12/09 14:32 11m tudor.ambarus@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.15.y report log
2022/12/09 14:29 7m tudor.ambarus@linaro.org upstream report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/01/29 15:44 21m bisect fix android13-5.15-lts OK (0) job log log

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/ext4/ext4.h:3355!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 336 Comm: syz-executor245 Not tainted 5.15.94-syzkaller-03204-g5448b2fda85f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3355 [inline]
RIP: 0010:ext4_mb_load_buddy_gfp+0xee5/0xf00 fs/ext4/mballoc.c:1498
Code: b1 11 c8 ff e9 0d f4 ff ff e8 57 d7 86 ff 48 c7 c7 80 78 69 86 4c 89 fe 4c 89 f2 e8 95 4e 94 00 e9 87 f2 ff ff e8 3b d7 86 ff <0f> 0b e8 34 d7 86 ff 0f 0b e8 2d d7 86 ff 0f 0b 66 2e 0f 1f 84 00
RSP: 0018:ffffc90000a87320 EFLAGS: 00010293
RAX: ffffffff81e89a85 RBX: 0000000000000001 RCX: ffff888105b92780
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffffc90000a873b0 R08: ffffffff81e88cb4 R09: ffffc90000a87460
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1102037b879
R13: ffff888101bdc3c8 R14: 0000000000000001 R15: ffff88810a146000
FS:  00005555572ab300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055c7b0d11618 CR3: 000000011faf3000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_mb_load_buddy fs/ext4/mballoc.c:1620 [inline]
 ext4_mballoc_query_range+0xc5/0x7b0 fs/ext4/mballoc.c:6560
 ext4_getfsmap_datadev+0x1cc8/0x2950 fs/ext4/fsmap.c:537
 ext4_getfsmap+0xcc6/0x1060 fs/ext4/fsmap.c:708
 ext4_ioc_getfsmap fs/ext4/ioctl.c:661 [inline]
 __ext4_ioctl fs/ext4/ioctl.c:863 [inline]
 ext4_ioctl+0x3463/0x5800 fs/ext4/ioctl.c:1277
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0x114/0x190 fs/ioctl.c:860
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f267b3083f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc9de2d958 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f267b3083f9
RDX: 0000000020000380 RSI: 00000000c0c0583b RDI: 0000000000000004
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000041b R11: 0000000000000246 R12: 00007f267b2c75d0
R13: 00007ffc9de2d980 R14: 00007ffc9de2d96c R15: 00007ffc9de2d970
 </TASK>
Modules linked in:
---[ end trace f7840bb66e83e6ee ]---
RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3355 [inline]
RIP: 0010:ext4_mb_load_buddy_gfp+0xee5/0xf00 fs/ext4/mballoc.c:1498
Code: b1 11 c8 ff e9 0d f4 ff ff e8 57 d7 86 ff 48 c7 c7 80 78 69 86 4c 89 fe 4c 89 f2 e8 95 4e 94 00 e9 87 f2 ff ff e8 3b d7 86 ff <0f> 0b e8 34 d7 86 ff 0f 0b e8 2d d7 86 ff 0f 0b 66 2e 0f 1f 84 00
RSP: 0018:ffffc90000a87320 EFLAGS: 00010293
RAX: ffffffff81e89a85 RBX: 0000000000000001 RCX: ffff888105b92780
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffffc90000a873b0 R08: ffffffff81e88cb4 R09: ffffc90000a87460
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1102037b879
R13: ffff888101bdc3c8 R14: 0000000000000001 R15: ffff88810a146000
FS:  00005555572ab300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2672efa000 CR3: 000000011faf3000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/22 12:34 android13-5.15-lts 5448b2fda85f 42a4d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2022/11/27 06:37 android13-5.15-lts 4ec71a9ec769 f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/03/24 12:40 android13-5.15-lts 5448b2fda85f f94b4a29 .config console log report info ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/03/23 12:07 android13-5.15-lts 5448b2fda85f f94b4a29 .config console log report info ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/03/20 03:56 android13-5.15-lts 5448b2fda85f 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/03/03 08:12 android13-5.15-lts 5448b2fda85f f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/02/26 15:13 android13-5.15-lts 5448b2fda85f ee50e71c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/02/12 23:16 android13-5.15-lts 5020746bff95 93e26d60 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
2023/02/06 05:06 android13-5.15-lts 7e0097918ff8 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 kernel BUG in ext4_mb_load_buddy_gfp
* Struck through repros no longer work on HEAD.