syzbot


KMSAN: uninit-value in fsnotify_connector_destroy_workfn

Status: upstream: reported on 2025/06/19 08:20
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+aaeb1646d01d0358cb2a@syzkaller.appspotmail.com
First crash: 5d01h, last: 5d01h
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] fsnotify: initialize destroy_next to avoid KMSAN uninit-value warning 3 (3) 2025/06/19 18:46
[PATCH v3] fsnotify: initialize destroy_next to avoid KMSAN uninit-value warning 1 (1) 2025/06/19 12:16
[syzbot] [fs?] KMSAN: uninit-value in fsnotify_connector_destroy_workfn 0 (1) 2025/06/19 08:20

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in fsnotify_connector_destroy_workfn+0x108/0x160 fs/notify/mark.c:323
 fsnotify_connector_destroy_workfn+0x108/0x160 fs/notify/mark.c:323
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0xb91/0x1d80 kernel/workqueue.c:3321
 worker_thread+0xedf/0x1590 kernel/workqueue.c:3402
 kthread+0xd5c/0xf00 kernel/kthread.c:464
 ret_from_fork+0x1e0/0x310 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:4154 [inline]
 slab_alloc_node mm/slub.c:4197 [inline]
 kmem_cache_alloc_noprof+0x81b/0xec0 mm/slub.c:4204
 fsnotify_attach_connector_to_object fs/notify/mark.c:663 [inline]
 fsnotify_add_mark_list fs/notify/mark.c:746 [inline]
 fsnotify_add_mark_locked+0x862/0x1a90 fs/notify/mark.c:821
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:888 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:620 [inline]
 inotify_update_watch fs/notify/inotify/inotify_user.c:647 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:781 [inline]
 __se_sys_inotify_add_watch+0x129c/0x1760 fs/notify/inotify/inotify_user.c:729
 __x64_sys_inotify_add_watch+0x97/0xe0 fs/notify/inotify/inotify_user.c:729
 x64_sys_call+0x330f/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:255
 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: 1 UID: 0 PID: 4808 Comm: kworker/u8:25 Tainted: G      D W           6.16.0-rc1-syzkaller-00236-g8c6bc74c7f89 #0 PREEMPT(undef) 
Tainted: [D]=DIE, [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: events_unbound fsnotify_connector_destroy_workfn

=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/15 07:43 upstream 8c6bc74c7f89 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in fsnotify_connector_destroy_workfn
* Struck through repros no longer work on HEAD.