syzbot


WARNING in __ext4fs_dirhash

Status: fixed on 2023/07/01 16:05
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+344aaa8697ebd232bfc8@syzkaller.appspotmail.com
Fix commit: 4b3cb1d108bf ext4: improve error handling from ext4_dirhash()
First crash: 374d, last: 372d
Cause bisection: introduced by (bisect log) :
commit 08dd966cfd2bef467acd1835ae10c32356037bc3
Author: Theodore Ts'o <tytso@mit.edu>
Date: Sat May 6 15:59:13 2023 +0000

  ext4: improve error handling from ext4_dirhash()

Crash: WARNING in __ext4fs_dirhash (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ext4?] WARNING in __ext4fs_dirhash 1 (4) 2023/05/12 16:18

Sample crash report:
EXT4-fs error (device loop0): ext4_orphan_get:1397: comm syz-executor380: couldn't read orphan inode 15 (err -117)
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: writeback.
EXT4-fs warning (device loop0): __ext4fs_dirhash:281: invalid/unsupported hash tree version 135
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5007 at fs/ext4/hash.c:284 __ext4fs_dirhash+0xa34/0xb40 fs/ext4/hash.c:281
Modules linked in:
CPU: 0 PID: 5007 Comm: syz-executor380 Not tainted 6.4.0-rc1-next-20230510-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
RIP: 0010:__ext4fs_dirhash+0xa34/0xb40 fs/ext4/hash.c:284
Code: 00 0f 85 16 01 00 00 48 8b 04 24 41 89 d8 48 c7 c1 60 d2 62 8a ba 19 01 00 00 48 c7 c6 80 d3 62 8a 48 8b 78 28 e8 9c 7a 12 00 <0f> 0b 41 bc ea ff ff ff e9 2a fd ff ff e8 aa 94 5a ff 8b 9c 24 88
RSP: 0018:ffffc900039cf768 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000087 RCX: 0000000000000000
RDX: ffff88801ed61dc0 RSI: ffffffff823bfd38 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000001 R12: 000000005948191c
R13: 0000000000000001 R14: dffffc0000000000 R15: ffff88807c0ba0c4
FS:  00005555571d4300(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000045ede0 CR3: 0000000073ff4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4fs_dirhash+0x13e/0x2e0 fs/ext4/hash.c:323
 htree_dirblock_to_tree+0x81e/0xc90 fs/ext4/namei.c:1122
 ext4_htree_fill_tree+0x327/0xc40 fs/ext4/namei.c:1217
 ext4_dx_readdir fs/ext4/dir.c:597 [inline]
 ext4_readdir+0x1d18/0x35f0 fs/ext4/dir.c:142
 iterate_dir+0x56e/0x6f0 fs/readdir.c:65
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64 fs/readdir.c:354 [inline]
 __x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f74ba642749
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 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:00007fff0b1f4e88 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f74ba642749
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007f74ba602010 R08: 000000000000044b R09: 0000000000000000
R10: 00007fff0b1f4d40 R11: 0000000000000246 R12: 00007f74ba6020a0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/10 23:42 linux-next 578215f3e21c 0fbd49f4 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/11 08:15 linux-next aabe491169be 0fbd49f4 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/11 06:39 linux-next aabe491169be 0fbd49f4 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/11 06:13 linux-next aabe491169be 0fbd49f4 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 21:04 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 20:51 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 20:49 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 19:48 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 19:05 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 18:31 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 17:14 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 16:29 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 16:16 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 15:57 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 13:22 linux-next 578215f3e21c 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 12:12 linux-next 578215f3e21c 14b12a99 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 11:51 linux-next 578215f3e21c 14b12a99 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 10:32 linux-next 578215f3e21c 14b12a99 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 10:31 linux-next 578215f3e21c 14b12a99 .config console log report info ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 09:40 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 07:26 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 06:45 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 06:16 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 06:09 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
2023/05/10 05:01 linux-next 578215f3e21c 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in __ext4fs_dirhash
* Struck through repros no longer work on HEAD.