syzbot


KMSAN: uninit-value in hfsplus_cat_bin_cmp_key

Status: upstream: reported C repro on 2024/11/06 05:02
Subsystems: hfs
[Documentation on labels]
Reported-by: syzbot+968ecf5dc01b3e0148ec@syzkaller.appspotmail.com
First crash: 4d20h, last: 4d11h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] hfsplus: add check for cat key length 1 (2) 2024/11/06 21:48
[syzbot] [hfs?] KMSAN: uninit-value in hfsplus_cat_bin_cmp_key 1 (3) 2024/11/06 07:20
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/11/06 09:58 54m eadavis@qq.com patch upstream OK log
2024/11/06 06:38 28m eadavis@qq.com patch upstream OK log

Sample crash report:
loop0: detected capacity change from 0 to 1024
=====================================================
BUG: KMSAN: uninit-value in hfsplus_cat_bin_cmp_key+0xf1/0x190 fs/hfsplus/catalog.c:36
 hfsplus_cat_bin_cmp_key+0xf1/0x190 fs/hfsplus/catalog.c:36
 hfs_find_rec_by_key+0xb1/0x240 fs/hfsplus/bfind.c:89
 __hfsplus_brec_find+0x26f/0x7b0 fs/hfsplus/bfind.c:124
 hfsplus_brec_find+0x445/0x970 fs/hfsplus/bfind.c:184
 hfsplus_brec_read+0x46/0x1a0 fs/hfsplus/bfind.c:211
 hfsplus_find_cat+0xdb/0x460 fs/hfsplus/catalog.c:202
 hfsplus_iget+0x729/0xae0 fs/hfsplus/super.c:82
 hfsplus_fill_super+0x151b/0x2700 fs/hfsplus/super.c:509
 mount_bdev+0x39a/0x520 fs/super.c:1679
 hfsplus_mount+0x4d/0x60 fs/hfsplus/super.c:647
 legacy_get_tree+0x114/0x290 fs/fs_context.c:662
 vfs_get_tree+0xb1/0x5a0 fs/super.c:1800
 do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
 path_mount+0x742/0x1f10 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount+0x722/0x810 fs/namespace.c:4034
 __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
 x64_sys_call+0x255a/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:4091 [inline]
 slab_alloc_node mm/slub.c:4134 [inline]
 __do_kmalloc_node mm/slub.c:4263 [inline]
 __kmalloc_noprof+0x661/0xf30 mm/slub.c:4276
 kmalloc_noprof include/linux/slab.h:882 [inline]
 hfsplus_find_init+0x95/0x1d0 fs/hfsplus/bfind.c:21
 hfsplus_iget+0x3c4/0xae0 fs/hfsplus/super.c:80
 hfsplus_fill_super+0x151b/0x2700 fs/hfsplus/super.c:509
 mount_bdev+0x39a/0x520 fs/super.c:1679
 hfsplus_mount+0x4d/0x60 fs/hfsplus/super.c:647
 legacy_get_tree+0x114/0x290 fs/fs_context.c:662
 vfs_get_tree+0xb1/0x5a0 fs/super.c:1800
 do_new_mount+0x71f/0x15e0 fs/namespace.c:3507
 path_mount+0x742/0x1f10 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount+0x722/0x810 fs/namespace.c:4034
 __x64_sys_mount+0xe4/0x150 fs/namespace.c:4034
 x64_sys_call+0x255a/0x3ba0 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 UID: 0 PID: 5784 Comm: syz-executor301 Not tainted 6.12.0-rc5-syzkaller-00181-g6c52d4da1c74 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
=====================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/02 05:28 upstream 6c52d4da1c74 f00eed24 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kmsan-gce-root KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
2024/11/02 04:52 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
2024/11/02 04:52 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
2024/11/02 13:32 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
2024/11/02 13:32 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in hfsplus_cat_bin_cmp_key
* Struck through repros no longer work on HEAD.