[syzbot] [ext4?] WARNING in __ext4fs_dirhash

6 views
Skip to first unread message

syzbot

unread,
May 10, 2023, 5:59:50 PM5/10/23
to adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, ty...@mit.edu
Hello,

syzbot found the following issue on:

HEAD commit: 578215f3e21c Add linux-next specific files for 20230510
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10a11e34280000
kernel config: https://syzkaller.appspot.com/x/.config?x=bb5a64fc61c29c5f
dashboard link: https://syzkaller.appspot.com/bug?extid=344aaa8697ebd232bfc8
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/61ae2512b5cb/disk-578215f3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e16190a5b183/vmlinux-578215f3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/04000a0b9ddf/bzImage-578215f3.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+344aaa...@syzkaller.appspotmail.com

EXT4-fs warning (device loop1): __ext4fs_dirhash:281: invalid/unsupported hash tree version 135
------------[ cut here ]------------
WARNING: CPU: 1 PID: 16903 at fs/ext4/hash.c:284 __ext4fs_dirhash+0xa34/0xb40 fs/ext4/hash.c:281
Modules linked in:
CPU: 1 PID: 16903 Comm: syz-executor.1 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:ffffc9000438f768 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000087 RCX: ffffc90016a21000
RDX: 0000000000040000 RSI: ffffffff823bfd38 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000001 R12: 000000005948191c
R13: 0000000000000001 R14: dffffc0000000000 R15: ffff88802825c0c4
FS: 00007f06285fe700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffaa49ad988 CR3: 000000007b715000 CR4: 00000000003506e0
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:0x7f0629a8c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f06285fe168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007f0629bac050 RCX: 00007f0629a8c169
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f0629ae7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc126daaaf R14: 00007f06285fe300 R15: 0000000000022000
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
May 10, 2023, 7:42:59 PM5/10/23
to adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, ty...@mit.edu
syzbot has found a reproducer for the following issue on:

HEAD commit: 578215f3e21c Add linux-next specific files for 20230510
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=15d567ea280000
kernel config: https://syzkaller.appspot.com/x/.config?x=bb5a64fc61c29c5f
dashboard link: https://syzkaller.appspot.com/bug?extid=344aaa8697ebd232bfc8
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b80e32280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=113f582a280000
mounted in repro: https://storage.googleapis.com/syzbot-assets/dbdccddcf7e8/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+344aaa...@syzkaller.appspotmail.com

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>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
May 11, 2023, 2:15:27 AM5/11/23
to adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com, ty...@mit.edu
syzbot has bisected this issue to:

commit 08dd966cfd2bef467acd1835ae10c32356037bc3
Author: Theodore Ts'o <ty...@mit.edu>
Date: Sat May 6 15:59:13 2023 +0000

ext4: improve error handling from ext4_dirhash()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15ecb2fa280000
start commit: 578215f3e21c Add linux-next specific files for 20230510
git tree: linux-next
final oops: https://syzkaller.appspot.com/x/report.txt?x=17ecb2fa280000
console output: https://syzkaller.appspot.com/x/log.txt?x=13ecb2fa280000
Reported-by: syzbot+344aaa...@syzkaller.appspotmail.com
Fixes: 08dd966cfd2b ("ext4: improve error handling from ext4_dirhash()")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Theodore Ts'o

unread,
May 12, 2023, 12:18:23 PM5/12/23
to syzbot, adilger...@dilger.ca, linux...@vger.kernel.org, linux-...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Wed, May 10, 2023 at 11:15:26PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit 08dd966cfd2bef467acd1835ae10c32356037bc3
> Author: Theodore Ts'o <ty...@mit.edu>
> Date: Sat May 6 15:59:13 2023 +0000
>
> ext4: improve error handling from ext4_dirhash()
>

n.b. This was due to a debugging WARN_ON left behind in the patch.
It's since been removed in ext4 dev tree and the updated commit is in
linux-next.

- Ted
Reply all
Reply to author
Forward
0 new messages