syzbot


KMSAN: uninit-value in squashfs_get_parent

Status: upstream: reported C repro on 2025/09/18 15:24
Subsystems: squashfs
[Documentation on labels]
Reported-by: syzbot+157bdef5cf596ad0da2c@syzkaller.appspotmail.com
First crash: 1d10h, last: 1d08h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] Squashfs: fix uninit-value in squashfs_get_parent 1 (1) 2025/09/18 23:33
[syzbot] [squashfs?] KMSAN: uninit-value in squashfs_get_parent 0 (1) 2025/09/18 15:24

Sample crash report:
loop2: detected capacity change from 0 to 8
=====================================================
BUG: KMSAN: uninit-value in squashfs_inode_lookup fs/squashfs/export.c:50 [inline]
BUG: KMSAN: uninit-value in squashfs_export_iget fs/squashfs/export.c:74 [inline]
BUG: KMSAN: uninit-value in squashfs_get_parent+0x3e9/0x540 fs/squashfs/export.c:108
 squashfs_inode_lookup fs/squashfs/export.c:50 [inline]
 squashfs_export_iget fs/squashfs/export.c:74 [inline]
 squashfs_get_parent+0x3e9/0x540 fs/squashfs/export.c:108
 reconnect_one fs/exportfs/expfs.c:130 [inline]
 reconnect_path+0x305/0xd30 fs/exportfs/expfs.c:220
 exportfs_decode_fh_raw+0x8bf/0xef0 fs/exportfs/expfs.c:535
 do_handle_to_path+0xe5/0x310 fs/fhandle.c:270
 handle_to_path fs/fhandle.c:394 [inline]
 do_handle_open+0xcb4/0x1220 fs/fhandle.c:409
 __do_sys_open_by_handle_at fs/fhandle.c:449 [inline]
 __se_sys_open_by_handle_at fs/fhandle.c:440 [inline]
 __x64_sys_open_by_handle_at+0xa6/0x100 fs/fhandle.c:440
 x64_sys_call+0x2f60/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:305
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 __alloc_frozen_pages_noprof+0x689/0xf00 mm/page_alloc.c:5171
 alloc_pages_mpol+0x328/0x860 mm/mempolicy.c:2416
 alloc_frozen_pages_noprof+0xf7/0x200 mm/mempolicy.c:2487
 alloc_slab_page mm/slub.c:2492 [inline]
 allocate_slab+0x24d/0x1220 mm/slub.c:2660
 new_slab mm/slub.c:2714 [inline]
 ___slab_alloc+0xff3/0x3470 mm/slub.c:3901
 __slab_alloc mm/slub.c:3992 [inline]
 __slab_alloc_node mm/slub.c:4067 [inline]
 slab_alloc_node mm/slub.c:4228 [inline]
 kmem_cache_alloc_lru_noprof+0x922/0xed0 mm/slub.c:4259
 squashfs_alloc_inode+0x5a/0xd0 fs/squashfs/super.c:673
 alloc_inode+0x8a/0x4a0 fs/inode.c:346
 new_inode+0x39/0x460 fs/inode.c:1145
 squashfs_fill_super+0x218c/0x3670 fs/squashfs/super.c:339
 get_tree_bdev_flags+0x6e3/0x920 fs/super.c:1692
 get_tree_bdev+0x38/0x50 fs/super.c:1715
 squashfs_get_tree+0x35/0x40 fs/squashfs/super.c:493
 vfs_get_tree+0xb0/0x5c0 fs/super.c:1815
 do_new_mount+0x733/0x1420 fs/namespace.c:3808
 path_mount+0x6db/0x1e90 fs/namespace.c:4123
 do_mount fs/namespace.c:4136 [inline]
 __do_sys_mount fs/namespace.c:4347 [inline]
 __se_sys_mount+0x6eb/0x7d0 fs/namespace.c:4324
 __x64_sys_mount+0xe4/0x150 fs/namespace.c:4324
 x64_sys_call+0x3604/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 0 UID: 0 PID: 6220 Comm: syz.2.23 Not tainted syzkaller #0 PREEMPT(none) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
=====================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/18 06:42 upstream d4b779985a6c e2beed91 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2 (corrupt fs)] ci-upstream-kmsan-gce-root KMSAN: uninit-value in squashfs_get_parent
2025/09/18 04:08 upstream d4b779985a6c e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in squashfs_get_parent
* Struck through repros no longer work on HEAD.