syzbot


kernel BUG in ext4_free_blocks (2)

Status: upstream: reported C repro on 2022/07/04 02:04
Subsystems: ext4 (incorrect?)
Reported-by: syzbot+15cd994e273307bf5cfa@syzkaller.appspotmail.com
Fix commit: ext4: block range must be validated before use in ext4_mb_clear_bb()
Patched on: [], missing on: [ci2-android-5-10 ci2-android-5-10-perf]
First crash: 261d, last: 3d10h

Cause bisection: failed (error log, bisect log)
similar bugs (8):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 kernel BUG in ext4_free_blocks 3 463d 496d 0/2 auto-closed as invalid on 2022/03/13 09:34
android-5-15 kernel BUG in ext4_free_blocks ext4 1 59d 59d 0/2 premoderation: reported on 2023/01/22 02:40
linux-4.14 kernel BUG in ext4_mb_load_buddy_gfp ext4 C 6 17d 691d 0/1 upstream: reported C repro on 2021/04/29 16:39
linux-4.19 kernel BUG at fs/ext4/ext4.h:LINE! ext4 C error 13 38d 856d 0/1 upstream: reported C repro on 2020/11/15 12:08
android-54 kernel BUG at fs/ext4/ext4.h:LINE! ext4 C 22 1d22h 894d 0/2 upstream: reported C repro on 2020/10/08 13:59
upstream kernel BUG at fs/ext4/ext4.h:LINE! 1 810d 806d 0/24 auto-closed as invalid on 2021/05/01 06:31
upstream kernel BUG in ext4_get_group_info ext4 C error 91 17h11m 579d 0/24 upstream: reported C repro on 2021/08/19 08:21
android-5-15 kernel BUG in ext4_mb_load_buddy_gfp ext4 C error 7 2d03h 115d 0/2 upstream: reported C repro on 2022/11/27 06:38
Last patch testing requests:
Created Duration User Patch Repo Result
2022/07/14 17:20 15m tadeusz.struk@linaro.org patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/07/13 17:28 15m tadeusz.struk@linaro.org patch git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2022/07/12 19:56 7m tadeusz.struk@linaro.org git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
EXT4-fs (loop0): ext4_check_descriptors: Checksum for group 0 failed (14603!=0)
EXT4-fs (loop0): orphan cleanup on readonly fs
EXT4-fs error (device loop0): ext4_free_blocks:5434: comm syz-executor392: Freeing blocks in system zone - Block = 16, count = 16
EXT4-fs (loop0): Remounting filesystem read-only
------------[ cut here ]------------
kernel BUG at fs/ext4/ext4.h:3254!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 371 Comm: syz-executor392 Not tainted 5.10.118-syzkaller-00163-gfa7f6a5f56d9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3254 [inline]
RIP: 0010:ext4_free_blocks+0x29ed/0x2ad0 fs/ext4/mballoc.c:5400
Code: f6 48 0f a3 05 f4 8e bf 04 0f 92 c3 40 0f 92 c6 31 ff e8 c6 62 8d ff 84 db 75 18 e8 ad 5f 8d ff e9 b8 00 00 00 e8 a3 5f 8d ff <0f> 0b e8 9c 5f 8d ff 0f 0b 65 ff 05 2f 1a 23 7e 48 c7 c0 68 bd 9c
RSP: 0018:ffffc900002aef80 EFLAGS: 00010293
RAX: ffffffff81df534d RBX: 0000000000000001 RCX: ffff888106992780
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000001
RBP: ffffc900002af200 R08: ffffffff81df350e R09: ffffc900002af140
R10: fffff52000055e2f R11: 1ffff92000055e28 R12: 0000000000000000
R13: dffffc0000000000 R14: 00000000ffffffff R15: ffff8881065e1000
FS:  00005555557bf300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe40c84cd8 CR3: 000000011e1bf000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ext4_clear_blocks+0x3b5/0x420 fs/ext4/indirect.c:877
 ext4_free_data fs/ext4/indirect.c:950 [inline]
 ext4_ind_truncate+0x83f/0x1040 fs/ext4/indirect.c:1141
 ext4_truncate+0xae6/0x1270 fs/ext4/inode.c:4347
 ext4_evict_inode+0xecf/0x16d0 fs/ext4/inode.c:288
 evict+0x2a3/0x6c0 fs/inode.c:578
 iput_final fs/inode.c:1656 [inline]
 iput+0x61f/0x7d0 fs/inode.c:1682
 ext4_quota_enable fs/ext4/super.c:6406 [inline]
 ext4_enable_quotas+0x5a5/0x960 fs/ext4/super.c:6429
 ext4_orphan_cleanup+0x2ee/0xdb0 fs/ext4/super.c:3058
 ext4_fill_super+0x896c/0x9240 fs/ext4/super.c:5089
 mount_bdev+0x25f/0x370 fs/super.c:1419
 ext4_mount+0x34/0x40 fs/ext4/super.c:6607
 legacy_get_tree+0xf0/0x190 fs/fs_context.c:592
 vfs_get_tree+0x88/0x290 fs/super.c:1549
 do_new_mount+0x289/0xad0 fs/namespace.c:2899
 path_mount+0x58d/0xce0 fs/namespace.c:3229
 do_mount fs/namespace.c:3242 [inline]
 __do_sys_mount fs/namespace.c:3450 [inline]
 __se_sys_mount+0x2d2/0x3c0 fs/namespace.c:3427
 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427
 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7fc08f7344da
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 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:00007ffc5770e458 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc5770e4b0 RCX: 00007fc08f7344da
RDX: 0000000020000000 RSI: 0000000020000040 RDI: 00007ffc5770e470
RBP: 00007ffc5770e470 R08: 00007ffc5770e4b0 R09: 0000000800000015
R10: 0000000000000081 R11: 0000000000000202 R12: 0000000000000004
R13: 0000000000000003 R14: 0000000000000003 R15: 0000000000000010
Modules linked in:
---[ end trace 8d6b13b82edeee5a ]---
RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:3254 [inline]
RIP: 0010:ext4_free_blocks+0x29ed/0x2ad0 fs/ext4/mballoc.c:5400
Code: f6 48 0f a3 05 f4 8e bf 04 0f 92 c3 40 0f 92 c6 31 ff e8 c6 62 8d ff 84 db 75 18 e8 ad 5f 8d ff e9 b8 00 00 00 e8 a3 5f 8d ff <0f> 0b e8 9c 5f 8d ff 0f 0b 65 ff 05 2f 1a 23 7e 48 c7 c0 68 bd 9c
RSP: 0018:ffffc900002aef80 EFLAGS: 00010293
RAX: ffffffff81df534d RBX: 0000000000000001 RCX: ffff888106992780
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000001
RBP: ffffc900002af200 R08: ffffffff81df350e R09: ffffc900002af140
R10: fffff52000055e2f R11: 1ffff92000055e28 R12: 0000000000000000
R13: dffffc0000000000 R14: 00000000ffffffff R15: ffff8881065e1000
FS:  00005555557bf300(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffe40c84cd8 CR3: 000000011e1bf000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (16):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-android-5-10 2022/07/04 02:03 android12-5.10-lts fa7f6a5f56d9 1434eec0 .config strace log report syz C kernel BUG in ext4_free_blocks
ci2-android-5-10 2023/02/22 11:04 android12-5.10-lts 416c4356f372 42a4d508 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/02/02 09:54 android12-5.10-lts 416c4356f372 9a6f477c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2022/11/27 06:37 android12-5.10-lts 673a7341bdab f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2022/10/02 16:49 android12-5.10-lts 391716695e71 feb56351 .config strace log report syz C [disk image] [vmlinux] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/01/19 17:35 android12-5.10-lts 416c4356f372 66fca3ae .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_free_blocks
ci2-android-5-10 2022/07/04 01:42 android12-5.10-lts fa7f6a5f56d9 1434eec0 .config console log report info kernel BUG in ext4_free_blocks
ci2-android-5-10 2023/03/18 21:06 android12-5.10-lts 416c4356f372 7939252e .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/03/09 16:28 android12-5.10-lts 416c4356f372 f08b59ac .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/02/16 03:54 android12-5.10-lts 416c4356f372 6be0f1f5 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/02/15 09:29 android12-5.10-lts 416c4356f372 e62ba3c1 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/02/06 04:45 android12-5.10-lts 416c4356f372 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/01/30 00:42 android12-5.10-lts 416c4356f372 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/01/10 13:00 android12-5.10-lts 416c4356f372 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2023/01/08 13:17 android12-5.10-lts 416c4356f372 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
ci2-android-5-10 2022/12/26 14:02 android12-5.10-lts 003c389455eb 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] kernel BUG in ext4_mb_load_buddy_gfp
* Struck through repros no longer work on HEAD.