[v5.15] WARNING in fscrypt_fname_siphash

0 views
Skip to first unread message

syzbot

unread,
Oct 20, 2024, 11:52:27 AM10/20/24
Hello,

syzbot found the following issue on:

HEAD commit: 584a40a22cb9 Linux 5.15.168
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1235825f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=afb077b44202210c
dashboard link: https://syzkaller.appspot.com/bug?extid=0095e55ed9774db43786
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/efb306d086fc/disk-584a40a2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4ce735bbc902/vmlinux-584a40a2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ca277f48b364/bzImage-584a40a2.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

------------[ cut here ]------------
WARNING: CPU: 0 PID: 6105 at fs/crypto/fname.c:543 fscrypt_fname_siphash+0xb9/0xf0
Modules linked in:

CPU: 0 PID: 6105 Comm: syz.3.479 Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:fscrypt_fname_siphash+0xb9/0xf0 fs/crypto/fname.c:543
Code: 42 0f b6 04 28 84 c0 75 38 41 8b 34 24 49 83 c6 40 4c 89 ff 4c 89 f2 5b 41 5c 41 5d 41 5e 41 5f e9 bc 58 40 02 e8 67 a9 92 ff <0f> 0b eb aa 89 d9 80 e1 07 38 c1 7c 8c 48 89 df e8 f2 72 dc ff eb
RSP: 0018:ffffc90003027470 EFLAGS: 00010283
RAX: ffffffff81edc9c9 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90004a01000 RSI: 00000000000000cd RDI: 00000000000000ce
RBP: ffffc90003027630 R08: ffffffff81edc96e R09: ffffffff821981b9
R10: 0000000000000007 R11: ffff88801a380000 R12: ffffc900030275c0
R13: dffffc0000000000 R14: ffff88806175b0c0 R15: ffff88805c5e8c98
FS: 00007efdc92276c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff5e20d1d60 CR3: 000000007e35e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__ext4fs_dirhash+0xdd2/0x14c0 fs/ext4/hash.c:268
ext4fs_dirhash+0x1b8/0x320 fs/ext4/hash.c:322
htree_dirblock_to_tree+0x723/0x10d0 fs/ext4/namei.c:1125
ext4_htree_fill_tree+0x73d/0x13f0 fs/ext4/namei.c:1220
ext4_dx_readdir fs/ext4/dir.c:606 [inline]
ext4_readdir+0x2f8e/0x3970 fs/ext4/dir.c:142
iterate_dir+0x224/0x570
__do_sys_getdents64 fs/readdir.c:369 [inline]
__se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7efdcadaeff9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007efdc9227038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007efdcaf66f80 RCX: 00007efdcadaeff9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007efdcae21296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007efdcaf66f80 R15: 00007ffdad0518c8
</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 [email protected].

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

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

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

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

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

syzbot

unread,
Oct 20, 2024, 12:18:29 PM10/20/24
syzbot has found a reproducer for the following issue on:

HEAD commit: 584a40a22cb9 Linux 5.15.168
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=105d825f980000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12b720a7980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15327240580000
mounted in repro: https://storage.googleapis.com/syzbot-assets/9b596a30383e/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

EXT4-fs (loop0): mounted filesystem without journal. Opts: test_dummy_encryption,journal_ioprio=0x0000000000000001,stripe=0x0000000000000000,,errors=continue. Quota mode: none.
fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-aesni"
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3567 at fs/crypto/fname.c:543 fscrypt_fname_siphash+0xb9/0xf0
Modules linked in:
CPU: 0 PID: 3567 Comm: syz-executor134 Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:fscrypt_fname_siphash+0xb9/0xf0 fs/crypto/fname.c:543
Code: 42 0f b6 04 28 84 c0 75 38 41 8b 34 24 49 83 c6 40 4c 89 ff 4c 89 f2 5b 41 5c 41 5d 41 5e 41 5f e9 bc 58 40 02 e8 67 a9 92 ff <0f> 0b eb aa 89 d9 80 e1 07 38 c1 7c 8c 48 89 df e8 f2 72 dc ff eb
RSP: 0018:ffffc900020d7470 EFLAGS: 00010293
RAX: ffffffff81edc9c9 RBX: 0000000000000000 RCX: ffff8880185e1dc0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900020d7630 R08: ffffffff81edc96e R09: ffffffff821981b9
R10: 0000000000000007 R11: ffff8880185e1dc0 R12: ffffc900020d75c0
R13: dffffc0000000000 R14: ffff88806dc98000 R15: ffff8880753fdc58
FS: 000055558f3bc380(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd2e856ed11 CR3: 000000007bd19000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__ext4fs_dirhash+0xdd2/0x14c0 fs/ext4/hash.c:268
ext4fs_dirhash+0x1b8/0x320 fs/ext4/hash.c:322
htree_dirblock_to_tree+0x723/0x10d0 fs/ext4/namei.c:1125
ext4_htree_fill_tree+0x73d/0x13f0 fs/ext4/namei.c:1220
ext4_dx_readdir fs/ext4/dir.c:606 [inline]
ext4_readdir+0x2f8e/0x3970 fs/ext4/dir.c:142
iterate_dir+0x224/0x570
__do_sys_getdents64 fs/readdir.c:369 [inline]
__se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f16af0d19f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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:00007ffc74c58cb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 6f72746e6f632f2e RCX: 00007f16af0d19f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f16af144610 R08: 0000000000000000 R09: 00007ffc74c58e88
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc74c58e78 R14: 0000000000000001 R15: 0000000000000001
</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,
Nov 2, 2024, 7:21:04 AM11/2/24
syzbot suspects this issue could be fixed by backporting the following commit:

commit 985b67cd86392310d9e9326de941c22fc9340eec
git tree: upstream
Author: Lizhi Xu <[email protected]>
Date: Wed Jun 5 01:23:35 2024 +0000

ext4: filesystems without casefold feature cannot be mounted with siphash

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12c59630580000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10ba7240580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16448c87980000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages